From: vsv Date: Thu, 16 Apr 2015 09:44:40 +0000 (+0300) Subject: Display only bodies on loading of a document and activation of a part X-Git-Tag: V_1.1.0~23^2~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9c4f542a78f1ea2a5cca49e27c0c17a9411d86a9;p=modules%2Fshaper.git Display only bodies on loading of a document and activation of a part --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 54815e0a4..eda386924 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -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; diff --git a/src/XGUI/XGUI_Workshop.h b/src/XGUI/XGUI_Workshop.h index ff4a8708a..37c04437f 100644 --- a/src/XGUI/XGUI_Workshop.h +++ b/src/XGUI/XGUI_Workshop.h @@ -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