]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Switch to the root document of current remove
authormpv <mikhail.ponikarov@opencascade.com>
Wed, 21 May 2014 09:48:03 +0000 (13:48 +0400)
committermpv <mikhail.ponikarov@opencascade.com>
Wed, 21 May 2014 09:48:03 +0000 (13:48 +0400)
src/Model/Model_PluginManager.cpp

index d6fca2bf745c915f148772cc187cb06f22d8752d..7a0a20d0a009958e1b4e4b1073aaefdbe5d00bf8 100644 (file)
@@ -63,7 +63,7 @@ bool Model_PluginManager::hasRootDocument()
 
 boost::shared_ptr<ModelAPI_Document> Model_PluginManager::currentDocument()
 {
-  if (!myCurrentDoc)
+  if (!myCurrentDoc || !Model_Application::getApplication()->hasDocument(myCurrentDoc->id()))
     myCurrentDoc = rootDocument();
   return myCurrentDoc;
 }