From: vsv Date: Wed, 24 Dec 2014 15:11:11 +0000 (+0300) Subject: Working with preselection after edit operation X-Git-Tag: V_0.7.0_rc1~49 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f9fd6abc84fc8a4a181cba2deb3efb41e047c516;p=modules%2Fshaper.git Working with preselection after edit operation --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 33a9e91ae..7b6aea622 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -216,11 +216,11 @@ void PartSet_SketcherMgr::onMouseReleased(ModuleBase_IViewWindow* theWnd, QMouse if (!aViewer->isMultiSelectionEnabled()) { aViewer->enableMultiselection(true); } - aViewer->AISContext()->MoveTo(theEvent->x(), theEvent->y(), theWnd->v3dView()); - if (theEvent->modifiers() & Qt::ShiftModifier) - aViewer->AISContext()->ShiftSelect(); - else - aViewer->AISContext()->Select(); + //aViewer->AISContext()->MoveTo(theEvent->x(), theEvent->y(), theWnd->v3dView()); + //if (theEvent->modifiers() & Qt::ShiftModifier) + // aViewer->AISContext()->ShiftSelect(); + //else + // aViewer->AISContext()->Select(); } void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent) diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index 09bc3494f..3b0cbc3e6 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -196,7 +196,13 @@ void XGUI_Displayer::redisplay(ObjectPtr theObject, bool isUpdateViewer) Handle(AIS_InteractiveContext) aContext = AISContext(); if (aContext.IsNull()) return; - aContext->Redisplay(aAISIO, isUpdateViewer); + bool aToSelect = aContext->IsSelected(aAISIO); + aContext->Redisplay(aAISIO, false); + // Restore selection state after redisplay + if (aToSelect) + aContext->SetSelected(aAISIO); + if (isUpdateViewer) + updateViewer(); } }