From: nds Date: Wed, 19 Aug 2015 13:15:15 +0000 (+0300) Subject: Operation presentation stayed in the viewer when argument is deselected in extrusion... X-Git-Tag: V_1.4.0_beta4~336 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c3070160ac8af0f187bd277a244e4d5e06f49ea7;p=modules%2Fshaper.git Operation presentation stayed in the viewer when argument is deselected in extrusion/group operations. The scenario of #478 bug can be used for checking. --- diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 164253ada..ab86f1bf9 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -709,6 +709,14 @@ void PartSet_Module::onObjectDisplayed(ObjectPtr theObject, AISObjectPtr theAIS) } } +void PartSet_Module::onBeforeObjectErase(ObjectPtr theObject, AISObjectPtr theAIS) +{ + // it should be recomputed in order to disappear in the viewer if the corresponded object + // is erased + if (myCustomPrs->isActive()) + myCustomPrs->customize(theObject); +} + void PartSet_Module::onViewTransformed(int theTrsfType) { // Set length of arrows constant in pixel size diff --git a/src/PartSet/PartSet_Module.h b/src/PartSet/PartSet_Module.h index 532e874f5..d2f9c163b 100644 --- a/src/PartSet/PartSet_Module.h +++ b/src/PartSet/PartSet_Module.h @@ -189,6 +189,11 @@ public slots: /// \param theAIS a presentation object virtual void onObjectDisplayed(ObjectPtr theObject, AISObjectPtr theAIS); + /// Slot called on before object erase + /// \param theObject a data object + /// \param theAIS a presentation object + virtual void onBeforeObjectErase(ObjectPtr theObject, AISObjectPtr theAIS); + /// Called on transformation in current viewer /// \param theTrsfType type of tranformation void onViewTransformed(int theTrsfType = 2);