From ac4bdd2286e03e504e68dcd0a507c355f87f52d8 Mon Sep 17 00:00:00 2001 From: mpa Date: Fri, 17 Jan 2014 10:06:21 +0000 Subject: [PATCH] Fixed a regression: wrong display of shape by choosing different shape type when exploding a shape --- src/EntityGUI/EntityGUI_SubShapeDlg.cxx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx index 268d90677..a68b3db20 100644 --- a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx +++ b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx @@ -739,24 +739,21 @@ void EntityGUI_SubShapeDlg::activateSelection() new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO"); if ( view->isVisible( io ) ) { Handle(GEOM_AISShape) aSh = GEOMBase::ConvertIOinGEOMAISShape( io, true ); - if(!aSh.IsNull()) { + if(!aSh.IsNull()) myDmMode = aSh->isTopLevel() ? aSh->prevDisplayMode() : aSh->DisplayMode(); - } - // Hide main shape, if explode on VERTEX - if (shapeType() != TopAbs_VERTEX) { - aDisplayer->Erase(myObject, false, false); - myIsHiddenMain = true; - } } else myDmMode = SUIT_Session::session()->resourceMgr()->integerValue( "Geometry", "display_mode" ); } } // Mantis issue 0021421: do not hide main shape, if explode on VERTEX - if (shapeType() == TopAbs_VERTEX) { - if (myIsHiddenMain) - aDisplayer->Display(myObject); + if (shapeType() != TopAbs_VERTEX) { + aDisplayer->Erase(myObject, false, false); + myIsHiddenMain = true; } + else + aDisplayer->Display(myObject); + aDisplayer->SetDisplayMode(myDmMode); if(!isApply) {