]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1322 correction in xml to use intersection point icon.
authornds <nds@opencascade.com>
Fri, 26 Feb 2016 18:53:32 +0000 (21:53 +0300)
committernds <nds@opencascade.com>
Fri, 26 Feb 2016 18:54:14 +0000 (21:54 +0300)
src/XGUI/XGUI_Workshop.cpp

index c754c7de3663bf108d0b52fbb6aa61595655f509..ab326f3dfefa513769da7b8ac4bfb90c5d7e36c5 100755 (executable)
@@ -1973,8 +1973,14 @@ void XGUI_Workshop::synchronizeGroupInViewer(const DocumentPtr& theDoc,
   int aSize = theDoc->size(theGroup);
   for (int i = 0; i < aSize; i++) {
     aObj = theDoc->object(theGroup, i);
-    if (aObj->isDisplayed())
+    if (aObj->isDisplayed()) {
+      // Hide the presentation with an empty shape. But isDisplayed state of the object should not
+      // be changed to the object becomes visible when the shape becomes not empty
+      ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObj);
+      if (aRes.get() && (!aRes->shape().get() || aRes->shape()->isNull()))
+        continue;
       myDisplayer->display(aObj, false);
+    }
   }
   if (theUpdateViewer)
     myDisplayer->updateViewer();