From: vsv Date: Fri, 21 Apr 2017 14:29:21 +0000 (+0300) Subject: Issue #2137: Synchronize active and module documents X-Git-Tag: V_2.7.1~47 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=64460e3e18a4bb258e6b041576eafd26d6c22d06;p=modules%2Fshaper.git Issue #2137: Synchronize active and module documents --- 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,