From: mpv Date: Fri, 27 Mar 2015 08:36:55 +0000 (+0300) Subject: Make Boolean operation tools hidden on apply of Boolean X-Git-Tag: V_1.1.0~75^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7c0f084d52f2385db205d458938b61322c645dcb;p=modules%2Fshaper.git Make Boolean operation tools hidden on apply of Boolean --- diff --git a/src/Model/Model_AttributeReference.cpp b/src/Model/Model_AttributeReference.cpp index 91de64eb5..860968cdd 100644 --- a/src/Model/Model_AttributeReference.cpp +++ b/src/Model/Model_AttributeReference.cpp @@ -45,7 +45,7 @@ void Model_AttributeReference::setValue(ObjectPtr theObject) // and reference from composite feature is removed automatically FeaturePtr anOwnerFeature = std::dynamic_pointer_cast(owner()); if (anOwnerFeature.get()) { - aData->addBackReference(anOwnerFeature, id()); + aData->addBackReference(anOwnerFeature, id(), false); } owner()->data()->sendAttributeUpdated(this); diff --git a/src/Model/Model_Data.cpp b/src/Model/Model_Data.cpp index d537db894..b3baaea43 100644 --- a/src/Model/Model_Data.cpp +++ b/src/Model/Model_Data.cpp @@ -259,10 +259,12 @@ void Model_Data::eraseBackReferences() aRes->setIsConcealed(false); } -void Model_Data::addBackReference(FeaturePtr theFeature, std::string theAttrID) +void Model_Data::addBackReference(FeaturePtr theFeature, std::string theAttrID, + const bool theApplyConcealment) { myRefsToMe.insert(theFeature->data()->attribute(theAttrID)); - if (ModelAPI_Session::get()->validators()->isConcealed(theFeature->getKind(), theAttrID)) { + if (theApplyConcealment && + ModelAPI_Session::get()->validators()->isConcealed(theFeature->getKind(), theAttrID)) { std::shared_ptr aRes = std::dynamic_pointer_cast(myObject); if (aRes) { diff --git a/src/Model/Model_Data.h b/src/Model/Model_Data.h index 5a2f6296e..8a45cfe64 100644 --- a/src/Model/Model_Data.h +++ b/src/Model/Model_Data.h @@ -180,10 +180,14 @@ class Model_Data : public ModelAPI_Data MODEL_EXPORT virtual void copyTo(std::shared_ptr theTarget); private: - /// removes all information about back references + /// Removes all information about back references void eraseBackReferences(); - // adds a back reference (with identifier which attribute references to this object - void addBackReference(FeaturePtr theFeature, std::string theAttrID); + /// Adds a back reference (with identifier which attribute references to this object + /// \param theFeature feature referenced to this + /// \param theAttrID identifier of the attribute that is references from theFeature to this + /// \param theApplyConcealment applies consealment flag changes + void addBackReference(FeaturePtr theFeature, std::string theAttrID, + const bool theApplyConcealment = true); }; #endif