From 64460e3e18a4bb258e6b041576eafd26d6c22d06 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 21 Apr 2017 17:29:21 +0300 Subject: [PATCH] Issue #2137: Synchronize active and module documents --- src/XGUI/XGUI_Workshop.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index bad768e17..77c4bd57f 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -2162,12 +2162,16 @@ void XGUI_Workshop::setStatusBarMessage(const QString& theMessage) void XGUI_Workshop::synchronizeViewer() { SessionPtr aMgr = ModelAPI_Session::get(); - DocumentPtr aDoc = aMgr->activeDocument(); + QList aDocs; + aDocs.append(aMgr->activeDocument()); + aDocs.append(aMgr->moduleDocument()); - synchronizeGroupInViewer(aDoc, ModelAPI_ResultConstruction::group(), false); - synchronizeGroupInViewer(aDoc, ModelAPI_ResultBody::group(), false); - synchronizeGroupInViewer(aDoc, ModelAPI_ResultPart::group(), false); - synchronizeGroupInViewer(aDoc, ModelAPI_ResultGroup::group(), false); + foreach(DocumentPtr aDoc, aDocs) { + synchronizeGroupInViewer(aDoc, ModelAPI_ResultConstruction::group(), false); + synchronizeGroupInViewer(aDoc, ModelAPI_ResultBody::group(), false); + synchronizeGroupInViewer(aDoc, ModelAPI_ResultPart::group(), false); + synchronizeGroupInViewer(aDoc, ModelAPI_ResultGroup::group(), false); + } } void XGUI_Workshop::synchronizeGroupInViewer(const DocumentPtr& theDoc, -- 2.39.2