Salome HOME
Make Boolean operation tools hidden on apply of Boolean
authormpv <mpv@opencascade.com>
Fri, 27 Mar 2015 08:36:55 +0000 (11:36 +0300)
committermpv <mpv@opencascade.com>
Fri, 27 Mar 2015 08:36:55 +0000 (11:36 +0300)
src/Model/Model_AttributeReference.cpp
src/Model/Model_Data.cpp
src/Model/Model_Data.h

index 91de64eb567de9f94889a6274c98f8ae8c6dcebc..860968cdd14f40f5381cea5a5193c354163104e3 100644 (file)
@@ -45,7 +45,7 @@ void Model_AttributeReference::setValue(ObjectPtr theObject)
     // and reference from composite feature is removed automatically
     FeaturePtr anOwnerFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(owner());
     if (anOwnerFeature.get()) {
-      aData->addBackReference(anOwnerFeature, id());
+      aData->addBackReference(anOwnerFeature, id(), false);
     }
 
     owner()->data()->sendAttributeUpdated(this);
index d537db894aa04f9a905c4a8339b9c7ddfbaa555f..b3baaea43867efe74c0fa09eef6c3a1e6f1b1b7f 100644 (file)
@@ -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<ModelAPI_Result> aRes = 
       std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
     if (aRes) {
index 5a2f6296e1a385745534e42fd2c56312aa4be27a..8a45cfe64bc5d8fecd62fb73db28049c2a9bde64 100644 (file)
@@ -180,10 +180,14 @@ class Model_Data : public ModelAPI_Data
   MODEL_EXPORT virtual void copyTo(std::shared_ptr<ModelAPI_Data> 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