From: nds Date: Tue, 29 Dec 2015 12:30:09 +0000 (+0300) Subject: Concealed state should be checked on feature created signal accepting. X-Git-Tag: V_2.2.0~226 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1b2348ce3a0cf5741f97fb34d3380e8d1be42260;p=modules%2Fshaper.git Concealed state should be checked on feature created signal accepting. 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. --- diff --git a/src/XGUI/XGUI_WorkshopListener.cpp b/src/XGUI/XGUI_WorkshopListener.cpp index 5f4e082fc..d44633033 100755 --- a/src/XGUI/XGUI_WorkshopListener.cpp +++ b/src/XGUI/XGUI_WorkshopListener.cpp @@ -402,6 +402,11 @@ void XGUI_WorkshopListener::onFeatureCreatedMsg(const std::shared_ptrdata()->isValid() || anObject->isDisabled() || !anObject->isDisplayed(); + if (!aHide) { // check that this is not hidden result + ResultPtr aRes = std::dynamic_pointer_cast(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