From: ana Date: Wed, 1 Apr 2015 13:36:47 +0000 (+0300) Subject: Fix for "0052652: Creation 2D polyline does not work properly" issue X-Git-Tag: V7_6_0a1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5d72df656f5d6b477434dee4b8dcac754ac45c72;p=modules%2Fgeom.git Fix for "0052652: Creation 2D polyline does not work properly" issue --- diff --git a/src/CurveCreator/CurveCreator_Widget.cxx b/src/CurveCreator/CurveCreator_Widget.cxx index 7bd5f4155..393fa49dc 100644 --- a/src/CurveCreator/CurveCreator_Widget.cxx +++ b/src/CurveCreator/CurveCreator_Widget.cxx @@ -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;