From: vsv Date: Mon, 18 May 2015 09:58:50 +0000 (+0300) Subject: Hide disabled features X-Git-Tag: V_1.2.0~152 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0a7eb0dc2414063e079866c6eb5c87d56f12c74f;p=modules%2Fshaper.git Hide disabled features --- diff --git a/src/ModelAPI/ModelAPI_Object.h b/src/ModelAPI/ModelAPI_Object.h index b13420f07..86cb4b51f 100644 --- a/src/ModelAPI/ModelAPI_Object.h +++ b/src/ModelAPI/ModelAPI_Object.h @@ -54,6 +54,9 @@ class ModelAPI_Object /// Request for initialization of data model of the object: adding all attributes virtual void initAttributes() = 0; + /// Returns the feature is disabled or not. + virtual bool isDisabled() const = 0; + /// Called on change of any argument-attribute of this object /// \param theID identifier of changed attribute MODELAPI_EXPORT virtual void attributeChanged(const std::string& theID); diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index d726e86b2..81604d8aa 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -466,7 +466,7 @@ void XGUI_Workshop::onFeatureRedisplayMsg(const std::shared_ptrdata() || !aObj->data()->isValid(); + bool aHide = !aObj->data() || !aObj->data()->isValid() || aObj->isDisabled(); if (!aHide) { // check that this is not hidden result ResultPtr aRes = std::dynamic_pointer_cast(aObj); aHide = aRes && aRes->isConcealed();