]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
1) Set more correct method name. 2) remove references to deleted objects.
authorakl <alexander.kovalev@opencascade.com>
Tue, 24 Jun 2014 07:39:43 +0000 (11:39 +0400)
committerakl <alexander.kovalev@opencascade.com>
Tue, 24 Jun 2014 07:39:43 +0000 (11:39 +0400)
idl/GEOM_Gen.idl
src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx
src/GEOM_I/GEOM_Gen_i.cc
src/GEOM_I/GEOM_Gen_i.hh

index a0f2020de211224951677bef3a29c13f56f7ded8..bbaafca6b54fd00f8758ad997505abe4ccae0e1f 100644 (file)
@@ -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);
 
   };
 };
index f51d100d12bcd613a19d47bbc83c9a09d8d333b8..4bd464a78dac41e4e8b2d45def5de9a2eb6f7d0f 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
index 9742087c284700a3e098883e42f1a1ce43453a60..a764d3aeb8f3ca67ffd09f83f3102f57e5fe5cb0 100755 (executable)
@@ -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,
index 7d074fa818b12a638cefbdf2ef7f0b5f36fe8a2f..5a2c0382b94f9bdb46aabdf5f9c27dd00bb9f5e4 100644 (file)
@@ -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                                                      //