diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl index a0f2020de..bbaafca6b 100644 --- a/idl/GEOM_Gen.idl +++ b/idl/GEOM_Gen.idl @@ -5101,7 +5101,7 @@ module GEOM in string_array theListOfEntries); /*! - * \brief Fills 3 lists that is used to clean study of redundant objects: + * \brief Fills 3 lists that is used to reduce study of redundant objects: * - dependencies of the given objects from other ones; * - children of the given objects; * - all other objects in study. @@ -5112,11 +5112,11 @@ module GEOM * \param theOtherEntries List of GEOM object entries which are in the study, but not in parents and children lists * \note This method is supposed to be used by GUI only. */ - void GetEntriesToCleanStudy(in SALOMEDS::Study theStudy, - inout string_array theSelectedEntries, - inout string_array theParentEntries, - inout string_array theSubEntries, - inout string_array theOtherEntries); + void GetEntriesToReduceStudy(in SALOMEDS::Study theStudy, + inout string_array theSelectedEntries, + inout string_array theParentEntries, + inout string_array theSubEntries, + inout string_array theOtherEntries); }; }; diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx index f48b2d82b..272d63d65 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx @@ -164,7 +164,7 @@ void GEOMToolsGUI_ReduceStudyDlg::init( const std::set& theObjectEn GEOM::string_array_var subObjects = new GEOM::string_array(); GEOM::string_array_var otherObjects = new GEOM::string_array(); - GeometryGUI::GetGeomGen()->GetEntriesToCleanStudy( GeometryGUI::ClientStudyToStudy( myStudy ), + GeometryGUI::GetGeomGen()->GetEntriesToReduceStudy( GeometryGUI::ClientStudyToStudy( myStudy ), keptObjects, parentsObjects, subObjects, otherObjects ); @@ -438,8 +438,10 @@ void GEOMToolsGUI_ReduceStudyDlg::removeObject( std::string& theStudyEntry ) _PTR(SObject) obj ( myStudy->FindObjectID( theStudyEntry.c_str() ) ); if ( obj ) { - //Remove visual properties of the object + // remove visual properties of the object appStudy->removeObjectFromAll(obj->GetID().c_str()); + // remove references to this object + appStudy->deleteReferencesTo( obj ); // remove objects from study aStudyBuilder->RemoveObjectWithChildren( obj ); // remove object from use case tree diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index 9742087c2..a764d3aeb 100755 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -3198,10 +3198,10 @@ void GEOM_Gen_i::getDownwardDependency( GEOM::GEOM_BaseObject_ptr gbo, } //============================================================================== -// function : GetEntriesToCleanStudy +// function : GetEntriesToReduceStudy // purpose : Fills 3 lists that is used to clean study of redundant objects //============================================================================== -void GEOM_Gen_i::GetEntriesToCleanStudy(SALOMEDS::Study_ptr theStudy, +void GEOM_Gen_i::GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy, GEOM::string_array& theSelectedEntries, GEOM::string_array& theParentEntries, GEOM::string_array& theSubEntries, diff --git a/src/GEOM_I/GEOM_Gen_i.hh b/src/GEOM_I/GEOM_Gen_i.hh index 7d074fa81..5a2c0382b 100644 --- a/src/GEOM_I/GEOM_Gen_i.hh +++ b/src/GEOM_I/GEOM_Gen_i.hh @@ -327,11 +327,11 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi /*! \brief Fills 3 lists that is used to clean study of redundant objects. * To be used from GUI. */ - void GetEntriesToCleanStudy(SALOMEDS::Study_ptr theStudy, - GEOM::string_array& theSelectedEntries, - GEOM::string_array& theParentEntries, - GEOM::string_array& theSubEntries, - GEOM::string_array& theOtherEntries); + void GetEntriesToReduceStudy(SALOMEDS::Study_ptr theStudy, + GEOM::string_array& theSelectedEntries, + GEOM::string_array& theParentEntries, + GEOM::string_array& theSubEntries, + GEOM::string_array& theOtherEntries); //-----------------------------------------------------------------------// // Internal methods //