Improving graphical 'Unpublish' functionality to hide also references of the given objects.

It is done according to 17816 note in 0022472 (EDF 2690 GEOM: Keep only some terminal objects and its parents) issue.
This commit is contained in:
akl 2014-07-23 11:57:20 +04:00
parent 806956971e
commit 70b0ad241e
2 changed files with 14 additions and 0 deletions

View 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();

View 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();