]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
2nd part of previous commit.
authorakl <alexander.kovalev@opencascade.com>
Wed, 23 Jul 2014 08:51:21 +0000 (12:51 +0400)
committerakl <alexander.kovalev@opencascade.com>
Wed, 23 Jul 2014 08:51:21 +0000 (12:51 +0400)
src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx
src/GEOM_SWIG/geomBuilder.py

index 4fa9d4efa8afe306251dc81f43500fa1453659cc..82c380ea7b22feef0f4bbb09c853191d30eb3c33 100644 (file)
@@ -396,6 +396,13 @@ void GEOMToolsGUI_ReduceStudyDlg::unpublishObjects( std::set<std::string>& theOb
       _PTR(AttributeDrawable) aDrw = aStudyBuilder->FindOrCreateAttribute( obj, "AttributeDrawable" );
       aDrw->SetDrawable( false );
       myDisplayer.EraseWithChildren( new SALOME_InteractiveObject( studyEntry.c_str(), "GEOM", "TEMP_IO" ) );
+      // hide references if any
+      std::vector< _PTR(SObject) > vso = myStudy->FindDependances(obj);
+      for ( int i = 0; i < vso.size(); i++ ) {
+        _PTR(SObject) refObj = vso[i];
+        aDrw = aStudyBuilder->FindOrCreateAttribute( refObj, "AttributeDrawable" );
+        aDrw->SetDrawable( false );
+      }
     }
   }
   myApp->updateObjectBrowser( false );
index 6235a8b70b4ad0ffbaff7201d44daea0e8d50929..925e2d72eb223e8e777b746b69427ae75a40e589 100644 (file)
@@ -955,6 +955,13 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 genericAttribute = self.myBuilder.FindOrCreateAttribute(aSObject, "AttributeDrawable")
                 drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
                 drwAttribute.SetDrawable(False)
+                # hide references if any
+                vso = self.myStudy.FindDependances(aSObject);
+                for refObj in vso :
+                    genericAttribute = self.myBuilder.FindOrCreateAttribute(refObj, "AttributeDrawable")
+                    drwAttribute = genericAttribute._narrow(SALOMEDS.AttributeDrawable)
+                    drwAttribute.SetDrawable(False)
+                    pass
                 pass
 
         # end of l1_geomBuilder_auxiliary