From: isz Date: Thu, 18 Sep 2014 10:43:12 +0000 (+0400) Subject: 0025093: Visualization - deletion of SelectMgr_SelectableObject does not invalidate... X-Git-Tag: V6_8_0_beta~105 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=b353b9b4352de5ed6decb0fe3389a455177e6f98;p=occt-copy.git 0025093: Visualization - deletion of SelectMgr_SelectableObject does not invalidate owners -Unstaged useless changes from CR0025093 -Now handles to Entity_owner are nullified in SelectMgr_Selection destructor -Code formatting --- diff --git a/src/SelectMgr/SelectMgr_Selection.cdl b/src/SelectMgr/SelectMgr_Selection.cdl index 0ae9525e1d..59b9c1a3d3 100644 --- a/src/SelectMgr/SelectMgr_Selection.cdl +++ b/src/SelectMgr/SelectMgr_Selection.cdl @@ -68,6 +68,12 @@ is --- Purpose: Constructs a selection object defined by the selection mode IdMode. -- The default setting 0 is the selection mode for a shape in its entirety. + Destroy (me : mutable) is static; + ---Level: Public + ---Purpose: + ---Category: Methods to modify the class definition + ---C++: alias ~ + Add (me : mutable; aprimitive : SensitiveEntity from SelectBasics) ---Purpose: Adds the sensitive primitive aprimitive to the list of diff --git a/src/SelectMgr/SelectMgr_Selection.cxx b/src/SelectMgr/SelectMgr_Selection.cxx index ee563f619c..187c3879f3 100644 --- a/src/SelectMgr/SelectMgr_Selection.cxx +++ b/src/SelectMgr/SelectMgr_Selection.cxx @@ -25,6 +25,19 @@ SelectMgr_Selection ::SelectMgr_Selection (const Standard_Integer IdMode): myMode(IdMode) {} + +//================================================== +// Function: Destroy +// Purpose : +//================================================== +void SelectMgr_Selection::Destroy() +{ + for (SelectBasics_ListIteratorOfListOfSensitive anIt(myentities); anIt.More(); anIt.Next()) + { + anIt.Value()->Set (NULL); + } +} + //================================================== // Function: ADD // Purpose :