mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-05 01:04:17 +05:00
Fix for "0052652: Creation 2D polyline does not work properly" issue
This commit is contained in:
parent
55bf84458b
commit
5d72df656f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user