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.
* \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);
};
};
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 );
_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
}
//==============================================================================
-// 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,
/*! \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 //