]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Improvement for lines editing by dragging
authorvsv <vitaly.smetannikov@opencascade.com>
Sat, 27 Dec 2014 09:12:49 +0000 (12:12 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Sat, 27 Dec 2014 09:12:49 +0000 (12:12 +0300)
src/PartSet/PartSet_SketcherMgr.cpp

index 00688b9b84265a93723250f79933552b1ec72f0c..f9c1eb3fd217b1fb1d440803f63097b3d68de2ef 100644 (file)
@@ -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<ModuleBase_ViewerPrs> 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();