From 8325f0f6bad857eef1ec0f6f3d04cbf225e35163 Mon Sep 17 00:00:00 2001 From: akl Date: Wed, 23 Jul 2014 12:51:21 +0400 Subject: [PATCH] 2nd part of previous commit. --- src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx | 7 +++++++ src/GEOM_SWIG/geomBuilder.py | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx index 4fa9d4efa..82c380ea7 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx @@ -396,6 +396,13 @@ void GEOMToolsGUI_ReduceStudyDlg::unpublishObjects( std::set& 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 ); diff --git a/src/GEOM_SWIG/geomBuilder.py b/src/GEOM_SWIG/geomBuilder.py index 6235a8b70..925e2d72e 100644 --- a/src/GEOM_SWIG/geomBuilder.py +++ b/src/GEOM_SWIG/geomBuilder.py @@ -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