Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix tests
  • Loading branch information
wonder-sk committed Feb 8, 2019
1 parent e6f148e commit b7138b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/vertextool/qgsvertextool.cpp
Expand Up @@ -475,14 +475,14 @@ void QgsVertexTool::cadCanvasReleaseEvent( QgsMapMouseEvent *e )

mNewVertexFromDoubleClick.reset();

// dragging of edges and double clicking on edges to add vertex are slightly overlapping
// dragging of edges and double-clicking on edges to add vertex are slightly overlapping
// so we need to cancel edge moving before we start dragging new vertex
stopDragging();
startDraggingAddVertex( m );

if ( e->modifiers() & Qt::ShiftModifier )
{
// if this was shift + double click, immediately place the vertex
// if this was shift + double-click, immediately place the vertex
moveVertex( m.point(), &m );
// force update of rubber bands
mouseMoveNotDragging( e );
Expand Down
3 changes: 3 additions & 0 deletions tests/src/app/testqgsvertextool.cpp
Expand Up @@ -547,6 +547,9 @@ void TestQgsVertexTool::testMoveMultipleVertices()
mouseClick( 1, 1, Qt::LeftButton );
mouseClick( 0, 0, Qt::LeftButton );

// extra click away from everything to clear the selection
mouseClick( 8, 8, Qt::LeftButton );

QCOMPARE( mLayerLine->undoStack()->index(), 2 );
QCOMPARE( mLayerLine->getFeature( mFidLineF1 ).geometry(), QgsGeometry::fromWkt( "LINESTRING(2 1, 0 0, 0 2)" ) );

Expand Down

0 comments on commit b7138b1

Please sign in to comment.