Salome HOME
Issue #216: fixed the problem with loading part and activating by double click
[modules/shaper.git] / src / Model / Model_Document.cpp
index 4ad70e8470680dc3df6074cfc0455f3a43a55ef8..8bb7c7809bce575ab456c856da75880378202186 100644 (file)
@@ -147,8 +147,10 @@ bool Model_Document::load(const char* theFileName)
   if (!isError) {
     myDoc->SetUndoLimit(UNDO_LIMIT);
     // to avoid the problem that feature is created in the current, not this, document
-    Model_Session::get()->setActiveDocument(anApp->getDocument(myID));
+    Model_Session::get()->setActiveDocument(anApp->getDocument(myID), false);
     synchronizeFeatures(false, true);
+    Model_Session::get()->setActiveDocument(Model_Session::get()->moduleDocument(), false);
+    Model_Session::get()->setActiveDocument(anApp->getDocument(myID), true);
   }
   return !isError;
 }