]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Improving graphical 'Unpublish' functionality to hide also references of the given...
authorakl <alexander.kovalev@opencascade.com>
Wed, 23 Jul 2014 07:57:20 +0000 (11:57 +0400)
committerakl <alexander.kovalev@opencascade.com>
Wed, 23 Jul 2014 07:57:20 +0000 (11:57 +0400)
It is done according to 17816 note in 0022472 (EDF 2690 GEOM: Keep only some terminal objects and its parents) issue.

src/GEOMToolsGUI/GEOMToolsGUI_1.cxx
src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.cxx

index 2ca503aaea33e1b344f142748bf04b3ebab8728c..6cc902366146bd01321a4ab466e978e003ceabd1 100644 (file)
@@ -590,6 +590,13 @@ void GEOMToolsGUI::OnUnpublishObject() {
             _PTR(AttributeDrawable) aDrw = B->FindOrCreateAttribute( obj, "AttributeDrawable" );
             aDrw->SetDrawable( false );
             disp->EraseWithChildren(IObject);
+            // hide references if any
+            std::vector< _PTR(SObject) > vso = aStudy->FindDependances(obj);
+            for ( int i = 0; i < vso.size(); i++ ) {
+              _PTR(SObject) refObj = vso[i];
+              aDrw = B->FindOrCreateAttribute( refObj, "AttributeDrawable" );
+              aDrw->SetDrawable( false );
+            }
           } // if ( obj )
         } // iterator
         aSelMgr->clearSelected();
index 514a5f2009cbdf20c62a60c9cb645fc15b164a4f..17c3a2b3f691cb14e947ed81dbe5550d9d791445 100644 (file)
@@ -340,6 +340,13 @@ void GEOMToolsGUI_PublishDlg::clickOnApply() {
           item->setData(0,Qt::CheckStateRole,QVariant());
         }
       }
+      // show references if any
+      std::vector< _PTR(SObject) > vso = aStudy->FindDependances(SO);
+      for ( int i = 0; i < vso.size(); i++ ) {
+       _PTR(SObject) refObj = vso[i];
+       aDrw = aBuilder->FindOrCreateAttribute( refObj, "AttributeDrawable" );
+       aDrw->SetDrawable( true );
+      }
     }
   }
   toProcess.clear();