From: vsv Date: Sat, 27 Dec 2014 08:04:29 +0000 (+0300) Subject: Preserve selection on setDisplay mode X-Git-Tag: V_0.7.0_rc1~36 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=39ece00421f955e65c687c00dc6c89a68a4f48af;p=modules%2Fshaper.git Preserve selection on setDisplay mode --- diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index 8be3d0bca..9d3ce8fb8 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -614,12 +614,16 @@ void XGUI_Displayer::setDisplayMode(ObjectPtr theObject, DisplayMode theMode, bo Handle(AIS_InteractiveObject) aAISIO = aAISObj->impl(); bool aCanBeShaded = ::canBeShaded(aAISIO); // In order to avoid extra closing/opening context - if (aCanBeShaded) + SelectMgr_IndexedMapOfOwner aSelectedOwners; + if (aCanBeShaded) { + myWorkshop->selector()->selection()->selectedOwners(aSelectedOwners); closeLocalContexts(false); + } aContext->SetDisplayMode(aAISIO, theMode, toUpdate); if (aCanBeShaded) { openLocalContext(); activateObjects(myActiveSelectionModes); + myWorkshop->selector()->setSelectedOwners(aSelectedOwners); } }