]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx
Salome HOME
Merge branch 'origin/akl/22379'
[modules/geom.git] / src / GEOMToolsGUI / GEOMToolsGUI_ReduceStudyDlg.cxx
index f48b2d82bba7769b603b47a9784f0a9f3edc1bfe..272d63d654aa3f0609f7532a9acf67e637f98456 100644 (file)
@@ -164,7 +164,7 @@ void GEOMToolsGUI_ReduceStudyDlg::init( const std::set<std::string>& 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