]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Flush the redisplay signal by the document in remove feature; do not change the conce...
authornds <natalia.donis@opencascade.com>
Thu, 2 Apr 2015 07:14:38 +0000 (10:14 +0300)
committernds <natalia.donis@opencascade.com>
Thu, 2 Apr 2015 07:14:38 +0000 (10:14 +0300)
src/Model/Model_Data.cpp
src/Model/Model_Data.h
src/Model/Model_Document.cpp
src/XGUI/XGUI_Workshop.cpp

index 53444bb6d45845a17f5d46e7d783fec7fa0bb36f..e8c1a980ea406cd429c2d6f984c399216fba90ff 100644 (file)
@@ -266,11 +266,6 @@ void Model_Data::removeBackReference(FeaturePtr theFeature, std::string theAttrI
     return;
 
   myRefsToMe.erase(anAttribute);
-  // TODO: check whether the concealed should be thrown down to the false value
-  std::shared_ptr<ModelAPI_Result> aRes = 
-    std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
-  if (aRes)
-    aRes->setIsConcealed(false);
 }
 
 void Model_Data::addBackReference(FeaturePtr theFeature, std::string theAttrID, 
index c057cede3f2aa85d5cb2dcc95acf7c91d8caa3b2..f3fd1c384e8dfa7c6704e0f3f9cf357e64bfa60a 100644 (file)
@@ -183,6 +183,7 @@ private:
   /// Removes all information about back references
   void eraseBackReferences();
   /// Adds a back reference (with identifier which attribute references to this object
+  /// It does not change the consealment flag of the data object result
   /// \param theFeature feature referenced to this
   /// \param theAttrID identifier of the attribute that is references from theFeature to this
   void removeBackReference(FeaturePtr theFeature, std::string theAttrID);
index ee8cebc14c9d0274a1dd486a1638fca540450c17..754138db905803368bf2264f8e24df9db7b330dc 100644 (file)
@@ -696,6 +696,8 @@ void Model_Document::removeFeature(FeaturePtr theFeature/*, const bool theCheck*
     }
     // event: feature is deleted
     ModelAPI_EventCreator::get()->sendDeleted(theFeature->document(), ModelAPI_Feature::group());
+    // the redisplay signal should be flushed in order to erase the feature presentation in the viewer
+    Events_Loop::loop()->flush(EVENT_DISP);
   }
 }
 
index 4b26dd4ee8d7eab122b36123a8510c3378517f52..5a6992d57646986c588f4211bba049ae6430f571 100644 (file)
@@ -1458,9 +1458,6 @@ These features will be deleted also. Would you like to continue?")).arg(aNames),
         aDoc->removeFeature(aFeature);
     }
   }
-  // the update signal should be emitted obligatory in order to have a redisplay
-  // signal and hide the removed presentations in the viewer
-  Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
   return true;
 }