Gui: add method setDocumentOfViewers and set documents of viewers in constructor of SplitView3DInventor

This commit is contained in:
wmayer
2023-01-10 17:23:48 +01:00
parent 5284d9c886
commit 406034f3ca
3 changed files with 11 additions and 4 deletions

View File

@@ -73,6 +73,13 @@ void AbstractSplitView::deleteSelf()
MDIView::deleteSelf();
}
void AbstractSplitView::setDocumentOfViewers(Gui::Document* document)
{
for (auto view : _viewer) {
view->setDocument(document);
}
}
void AbstractSplitView::viewAll()
{
for (std::vector<View3DInventorViewer*>::iterator it = _viewer.begin(); it != _viewer.end(); ++it)
@@ -820,6 +827,8 @@ SplitView3DInventor::SplitView3DInventor(int views, Gui::Document* pcDocument, Q
mainSplitter->show();
setCentralWidget(mainSplitter);
setDocumentOfViewers(pcDocument);
// apply the user settings
setupSettings();
}