X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGroupGUI%2FGroupGUI_GroupDlg.cxx;h=d3c7e224a00ee1dcd9781f73f9594c43c287949a;hb=3e767d761d4fc6ba92ddb28798dce6bf65a86cda;hp=4cc1e2cb56413d17893bd1ecad393fa6c2449448;hpb=92fe1b6a7851c289d93d2f82199680e71bf4ed25;p=modules%2Fgeom.git diff --git a/src/GroupGUI/GroupGUI_GroupDlg.cxx b/src/GroupGUI/GroupGUI_GroupDlg.cxx index 4cc1e2cb5..d3c7e224a 100644 --- a/src/GroupGUI/GroupGUI_GroupDlg.cxx +++ b/src/GroupGUI/GroupGUI_GroupDlg.cxx @@ -474,7 +474,7 @@ void GroupGUI_GroupDlg::SelectionIntoArgument() } myMainObj = anObj; myEditCurrentArgument->setText(GEOMBase::GetName(anObj)); - // activate subshapes selection by default + // activate sub-shapes selection by default myEditCurrentArgument = 0; activateSelection(); updateState(); @@ -620,9 +620,23 @@ void GroupGUI_GroupDlg::showOnlySelected() aDisplayer->Erase(aSelList, /*forced=*/false, /*updateViewer=*/true); } else { + // Mantis issue 0021421: do not hide main shape, if explode on VERTEX + SALOME_View* view = GEOM_Displayer::GetActiveView(); + if (view) { + CORBA::String_var aMainEntry = myMainObj->GetStudyEntry(); + Handle(SALOME_InteractiveObject) io = + new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO"); + if (view->isVisible(io)) myIsHiddenMain = true; + } + aDisplayer->EraseAll(/*forced = false, updateViewer = true*/); aDisplayer->Display(aSelList, true); + // Mantis issue 0021421: do not hide main shape, if explode on VERTEX + if (getShapeType() == TopAbs_VERTEX && myIsHiddenMain) { + aDisplayer->Display(myMainObj); + } + // for the case when selected ids were not displayed in the viewer: Mantis issue 0021367 highlightSubShapes(); } @@ -807,13 +821,22 @@ void GroupGUI_GroupDlg::activateSelection() myIsShapeType) // check if shape type is already choosen by user { GEOM_Displayer* aDisplayer = getDisplayer(); - SALOME_View* view = GEOM_Displayer::GetActiveView(); - if (view) { - CORBA::String_var aMainEntry = myMainObj->GetStudyEntry(); - Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO"); - if (view->isVisible(io)) { - aDisplayer->Erase(myMainObj, false, false); - myIsHiddenMain = true; + + // Mantis issue 0021421: do not hide main shape, if explode on VERTEX + if (getShapeType() == TopAbs_VERTEX) { + if (myIsHiddenMain) + aDisplayer->Display(myMainObj); + } + else { + SALOME_View* view = GEOM_Displayer::GetActiveView(); + if (view) { + CORBA::String_var aMainEntry = myMainObj->GetStudyEntry(); + Handle(SALOME_InteractiveObject) io = + new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO"); + if (view->isVisible(io)) { + aDisplayer->Erase(myMainObj, false, false); + myIsHiddenMain = true; + } } } @@ -973,7 +996,7 @@ void GroupGUI_GroupDlg::highlightSubShapes() SALOME_ListIO aSelList; - // To highlight the selected subshape in Object Browser, if it's already published under the main shape + // To highlight the selected sub-shape in Object Browser, if it's already published under the main shape GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations(getStudyId()); QMap childsMap; SalomeApp_Study* appStudy = dynamic_cast(app->activeStudy());