if(MYDEBUG) MESSAGE("VisuGUI::OnDisplayPrs");
QApplication::setOverrideCursor(Qt::waitCursor);
- SALOME_ListIO aList;
+ SALOME_ListIO aSel, aList;
LightApp_SelectionMgr* mgr = GetSelectionMgr(this);
- mgr->selectedObjects(aList);
+ mgr->selectedObjects( aSel );
+
+ extractContainers( aSel, aList );
Handle(SALOME_InteractiveObject) anIO;
for ( SALOME_ListIteratorOfListIO it( aList ); it.More(); it.Next() ) {
if (vw)
vw->unHighlightAll();
- SALOME_ListIO aList;
+ SALOME_ListIO aList, aSel;
LightApp_SelectionMgr* mgr = GetSelectionMgr(this);
- mgr->selectedObjects(aList);
+ mgr->selectedObjects( aSel );
+
+ extractContainers( aSel, aList );
Handle(SALOME_InteractiveObject) anIO;
for ( SALOME_ListIteratorOfListIO it( aList ); it.More(); it.Next() ) {
QString orCurveInvisible = "or (type='VISU::TCURVE'" + andInvisible + ")";
QString aPrsVisible = "(($type in {'VISU::TMESH' " + aPrsAll + "}) and isVisible)";
QString aPrsInvisible = "(($type in {'VISU::TMESH' " + aPrsAll + "})" + andInvisible + ")";
+ QString aComponent = "( selcount=1 and canBeDisplayed )";
- QString anEraseRule = "selcount>0 and ({true} in $canBeDisplayed) and (" + aPrsVisible +
- " or (client='ObjectBrowser' and (" + aTableOrCont + orCurveVisible + ")))";
+ QString anEraseRule = "( selcount>0 and ({true} in $canBeDisplayed) and (" + aPrsVisible +
+ " or (client='ObjectBrowser' and (" + aTableOrCont + orCurveVisible + "))) ) or " + aComponent;
- QString aDisplayRule = "selcount>0 and ({true} in $canBeDisplayed) and (" + aPrsInvisible +
- " or (client='ObjectBrowser' and (" + aTableOrCont + orCurveInvisible + ")))";
+ QString aDisplayRule = "( selcount>0 and ({true} in $canBeDisplayed) and (" + aPrsInvisible +
+ " or (client='ObjectBrowser' and (" + aTableOrCont + orCurveInvisible + "))) ) or" + aComponent;
- QString aDOnlyRule = "selcount>0 and ({true} in $canBeDisplayed) and (($type in {'VISU::TMESH' " + aPrsAll + "})"
+ QString aDOnlyRule = "( selcount>0 and ({true} in $canBeDisplayed) and (($type in {'VISU::TMESH' " + aPrsAll + "})"
" or (client='ObjectBrowser' and ((type='VISU::TTABLE' and nbChildren>0) or"
- " ($type in {'VISU::TCURVE' 'VISU::TCONTAINER'}))))";
+ " ($type in {'VISU::TCURVE' 'VISU::TCONTAINER'})))) ) or" + aComponent;
mgr->setRule( action( VISU_ERASE ), anEraseRule, true );
mgr->setRule( action( VISU_DISPLAY ), aDisplayRule, true );