]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix for "0052652: Creation 2D polyline does not work properly" issue
authorana <ana@opencascade.com>
Wed, 1 Apr 2015 13:36:47 +0000 (16:36 +0300)
committerana <ana@opencascade.com>
Wed, 1 Apr 2015 13:36:47 +0000 (16:36 +0300)
src/CurveCreator/CurveCreator_Widget.cxx

index 7bd5f4155b080c0f43006623b6a996f5dd138221..393fa49dcf3f3538f2e4c27497d0b1fc0c5673c0 100644 (file)
@@ -954,17 +954,10 @@ void CurveCreator_Widget::addCoordsByClick( QMouseEvent* pe )
       return;
 
     gp_Pnt aPnt;    
+    OCCViewer_ViewPort3d* vp = getViewPort();
 
-    ic->InitSelected();
-    if ( pe->modifiers() == Qt::ShiftModifier )
-      ic->ShiftSelect();  // Append selection
-    else
-      ic->Select();       // New selection
+    aPnt = CurveCreator_Utils::ConvertClickToPoint( pe->x(), pe->y(), vp->getView() );
 
-    {
-      OCCViewer_ViewPort3d* vp = getViewPort();
-      aPnt = CurveCreator_Utils::ConvertClickToPoint( pe->x(), pe->y(), vp->getView() );
-    }
     // set the coordinates into dialog
     CurveCreator::Coordinates aCoords;
     aCoords.push_back( aPnt.X() );
@@ -1012,7 +1005,12 @@ void CurveCreator_Widget::onMousePress( SUIT_ViewWindow*, QMouseEvent* theEvent
  */
 void CurveCreator_Widget::onMouseRelease( SUIT_ViewWindow* theWindow, QMouseEvent* theEvent )
 {
-  
+  if ( getActionMode() != ModificationMode )
+  {
+    // Emit selectionChanged() signal
+    getOCCViewer()->performSelectionChanged();
+    return;
+  } 
   if (theEvent->button() != Qt::LeftButton) return;
   if (!theWindow->inherits("OCCViewer_ViewWindow")) return;
 
@@ -1058,13 +1056,6 @@ void CurveCreator_Widget::onMouseRelease( SUIT_ViewWindow* theWindow, QMouseEven
     }
   }
 
-  if ( getActionMode() != ModificationMode )
-  {
-    // Emit selectionChanged() signal
-    getOCCViewer()->performSelectionChanged();
-    return;
-  }
-
   if ( myDragStarted ) {
     bool isDragged = myDragged;
     CurveCreator_ICurve::SectionToPointList aDraggedPoints;