]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Concealed state should be checked on feature created signal accepting.
authornds <nds@opencascade.com>
Tue, 29 Dec 2015 12:30:09 +0000 (15:30 +0300)
committernds <nds@opencascade.com>
Tue, 29 Dec 2015 12:30:09 +0000 (15:30 +0300)
Scenario:
1. Create Extrusion, ExtrusionSketch, Boolean between them, ExtrusionCut, Partition.
2. Save study
3. Open saved study. The ExtrusionCut result is visualized. Call Hide for Partition, ExtrusionCut is in the viewer however there is no such a result in Bodies.

src/XGUI/XGUI_WorkshopListener.cpp

index 5f4e082fc82d8e5924a981d007fd5a2c568e4eb6..d446330332722e5d3dc5c2933efa2d6ed7a869a3 100755 (executable)
@@ -402,6 +402,11 @@ void XGUI_WorkshopListener::onFeatureCreatedMsg(const std::shared_ptr<ModelAPI_O
     bool aHide = !anObject->data()->isValid() || 
                  anObject->isDisabled() ||
                  !anObject->isDisplayed();
+    if (!aHide) { // check that this is not hidden result
+      ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(anObject);
+      bool isConcealed = aRes && aRes->isConcealed();
+      aHide = aRes && aRes->isConcealed();
+    }
     if (!aHide) {
       // setDisplayed has to be called in order to synchronize internal state of the object 
       // with list of displayed objects