diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index 2ca503aae..6cc902366 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -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(); diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.cxx index 514a5f200..17c3a2b3f 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.cxx @@ -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();