From: vsv Date: Sat, 27 Dec 2014 09:12:49 +0000 (+0300) Subject: Improvement for lines editing by dragging X-Git-Tag: V_0.7.0_rc1~30^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4cec87c8b2a490943572037a543ea65b4c5d8e89;p=modules%2Fshaper.git Improvement for lines editing by dragging --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 00688b9b8..f9c1eb3fd 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -125,6 +125,11 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE aOperation->abort(); return; } + + // MoveTo in order to highlight current object + ModuleBase_IViewer* aViewer = aWorkshop->viewer(); + aViewer->AISContext()->MoveTo(theEvent->x(), theEvent->y(), theWnd->v3dView()); + // Remember highlighted objects for editing ModuleBase_ISelection* aSelect = aWorkshop->selection(); QList aHighlighted = aSelect->getHighlighted(); @@ -186,8 +191,8 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE launchEditing(); } else if (isSketchOpe && isEditing) { - // If selected another object - aOperation->abort(); + // If selected another object commit current result + aOperation->commit(); myIsDragging = true; get2dPoint(theWnd, theEvent, myCurX, myCurY); @@ -216,7 +221,7 @@ void PartSet_SketcherMgr::onMouseReleased(ModuleBase_IViewWindow* theWnd, QMouse myIsDragging = false; if (myDragDone) { aViewer->enableMultiselection(true); - aOp->commit(); + //aOp->commit(); myEditingFeatures.clear(); myEditingAttr.clear();