]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Display only bodies on loading of a document and activation of a part
authorvsv <vitaly.smetannikov@opencascade.com>
Thu, 16 Apr 2015 09:44:40 +0000 (12:44 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Thu, 16 Apr 2015 09:44:40 +0000 (12:44 +0300)
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_Workshop.h

index 54815e0a430851a1691f7c330b7fce05ac2e610e..eda3869245186db1cd2e1090526b5f686bbb07a3 100644 (file)
@@ -145,7 +145,8 @@ XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
       myObjectBrowser(0),
       myDisplayer(0),
       myUpdatePrefs(false),
-      myPartActivating(false)
+      myPartActivating(false),
+      myIsLoadingData(false)
 {
   myMainWindow = mySalomeConnector ? 0 : new AppElements_MainWindow();
 
@@ -917,10 +918,12 @@ void XGUI_Workshop::onOpen()
     return;
   }
   QApplication::setOverrideCursor(Qt::WaitCursor);
+  myIsLoadingData = true;
   aSession->load(myCurrentDir.toLatin1().constData());
   myObjectBrowser->rebuildDataTree();
   displayAllResults();
   updateCommandStatus();
+  myIsLoadingData = false;
   QApplication::restoreOverrideCursor();
 }
 
@@ -1670,7 +1673,7 @@ bool XGUI_Workshop::displayObject(ObjectPtr theObj)
     myDisplayer->display(theObj, false);
     if (aNb == 0)
       viewer()->fitAll();
-  } else 
+  } else if (!(myIsLoadingData || myPartActivating))
     myDisplayer->display(theObj, false);
 
   return true;
index ff4a8708a336473849d6f8f4e0f2cdeb36e6103d..37c04437fdc18426d5a0527af068e7ae500853ce 100644 (file)
@@ -441,6 +441,9 @@ private:
 
   // Flag to check that part document is in process of activating
   bool myPartActivating;
+
+  /// The flag is true when we loading a document
+  bool myIsLoadingData;
 };
 
 #endif