From: nds Date: Fri, 16 May 2014 14:30:59 +0000 (+0400) Subject: refs #30 - Sketch base GUI: create, draw lines X-Git-Tag: V_0.2~52 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=30160841dd2a8bfef3b4588325b8c0fc217bac26;p=modules%2Fshaper.git refs #30 - Sketch base GUI: create, draw lines The selection is lost by second click in the same point The scenario is: Click sketch feature, click line feature, create line, select created line by click in a point - it is selected, select the same point secondly - the selection disappears --- diff --git a/src/XGUI/XGUI_Viewer.cpp b/src/XGUI/XGUI_Viewer.cpp index 78d9d841c..734a1a469 100644 --- a/src/XGUI/XGUI_Viewer.cpp +++ b/src/XGUI/XGUI_Viewer.cpp @@ -532,6 +532,11 @@ void XGUI_Viewer::onMouseReleased(XGUI_ViewWindow* theWindow, QMouseEvent* theEv // emit deselection(); if (myStartPnt == myEndPnt) { + // the MoveTo is necessary for the second click in the same point. Otherwise the selection is lost. + Handle(V3d_View) aView3d = theWindow->viewPort()->getView(); + if ( !aView3d.IsNull() ) { + myAISContext->MoveTo(theEvent->x(), theEvent->y(), aView3d); + } if (aHasShift && myMultiSelectionEnabled) myAISContext->ShiftSelect(); else