From: nds Date: Thu, 2 Apr 2015 07:14:38 +0000 (+0300) Subject: Flush the redisplay signal by the document in remove feature; do not change the conce... X-Git-Tag: V_1.1.0~64 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e13838f2afec561f5eb8c26cebf31fa67dcde81d;p=modules%2Fshaper.git Flush the redisplay signal by the document in remove feature; do not change the concealed state during removeBackReference. --- diff --git a/src/Model/Model_Data.cpp b/src/Model/Model_Data.cpp index 53444bb6d..e8c1a980e 100644 --- a/src/Model/Model_Data.cpp +++ b/src/Model/Model_Data.cpp @@ -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 aRes = - std::dynamic_pointer_cast(myObject); - if (aRes) - aRes->setIsConcealed(false); } void Model_Data::addBackReference(FeaturePtr theFeature, std::string theAttrID, diff --git a/src/Model/Model_Data.h b/src/Model/Model_Data.h index c057cede3..f3fd1c384 100644 --- a/src/Model/Model_Data.h +++ b/src/Model/Model_Data.h @@ -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); diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index ee8cebc14..754138db9 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -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); } } diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 4b26dd4ee..5a6992d57 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -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; }