]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Line reentrant creation: do not create line if point is clicked in viewer, but releas...
authornds <nds@opencascade.com>
Mon, 3 Apr 2017 10:22:22 +0000 (13:22 +0300)
committernds <nds@opencascade.com>
Mon, 3 Apr 2017 10:22:42 +0000 (13:22 +0300)
src/PartSet/PartSet_SketcherMgr.cpp
src/SketchPlugin/SketchPlugin_Line.cpp

index 1fd62e95de79c6560fb1c7a72182491811dfdd66..05378d4a504c8e6f860c4cc32f28ce9946f50e1f 100755 (executable)
@@ -428,6 +428,10 @@ void PartSet_SketcherMgr::onMouseReleased(ModuleBase_IViewWindow* theWnd, QMouse
   if (myModule->sketchReentranceMgr()->processMouseReleased(theWnd, theEvent))
     return;
 
+  // if mouse is pressed when it was over view and at release the mouse is out of view, do nothing
+  if (!myIsMouseOverViewProcessed)
+    return;
+
   ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
   ModuleBase_IViewer* aViewer = aWorkshop->viewer();
   if (!aViewer->canDragByMouse())
index 99d69ce67bcc16c3cebf2c8528351b8140abc5f7..5760a866f92da39fbd94002d8f7d2299e163c886 100644 (file)
@@ -111,11 +111,6 @@ std::string SketchPlugin_Line::processEvent(const std::shared_ptr<Events_Message
                                                  aNFData->attribute(SketchPlugin_Line::START_ID()));
     aNPoint->setValue(aSPoint->x(), aSPoint->y());
     SketchPlugin_ConstraintCoincidence::createCoincidenceFeature(sketch(), aSPoint, aNPoint);
-
-    aNPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
-                                                 aSFData->attribute(SketchPlugin_Line::END_ID()));
-    aNPoint->setValue(aSPoint->x(), aSPoint->y());
-
   }
   return aFilledAttributeName;
 }