Skip to content
Permalink
Browse files
[convert to curve] fix test
(change of key and key now cancels dragging vertex)
  • Loading branch information
olivierdalang authored and nyalldawson committed Jun 18, 2021
1 parent b0590e9 commit e205ce87125475ac8d10cd3c1353042beb28b5dd
Showing with 3 additions and 5 deletions.
  1. +3 −5 tests/src/app/testqgsvertextool.cpp
@@ -808,12 +808,10 @@ void TestQgsVertexTool::testConvertVertex()
// convert vertex in compoundCurve while moving vertex
QCOMPARE( mLayerCompoundCurve->getFeature( mFidCompoundCurveF1 ).geometry(), QgsGeometry::fromWkt( "CompoundCurve ( CircularString (14 14, 10 10, 17 10))" ) );
mouseClick( 10, 10, Qt::LeftButton );
keyClick( Qt::Key_C );
mouseClick( 10, 10, Qt::LeftButton );
QCOMPARE( mLayerCompoundCurve->undoStack()->index(), 4 ); // one undo for move, one undo for convert
keyClick( Qt::Key_O );
QCOMPARE( mLayerCompoundCurve->undoStack()->index(), 3 );
QCOMPARE( mLayerCompoundCurve->getFeature( mFidCompoundCurveF1 ).geometry(), QgsGeometry::fromWkt( "CompoundCurve ((14 14, 10 10, 17 10))" ) );
mLayerCompoundCurve->undoStack()->undo();
mLayerCompoundCurve->undoStack()->undo();
QCOMPARE( mLayerCompoundCurve->undoStack()->index(), 2 );
QCOMPARE( mLayerCompoundCurve->getFeature( mFidCompoundCurveF1 ).geometry(), QgsGeometry::fromWkt( "CompoundCurve ( CircularString (14 14, 10 10, 17 10))" ) );

@@ -822,7 +820,7 @@ void TestQgsVertexTool::testConvertVertex()
mousePress( 9.5, 9.5, Qt::LeftButton );
mouseMove( 10.5, 10.5 );
mouseRelease( 10.5, 10.5, Qt::LeftButton );
keyClick( Qt::Key_C );
keyClick( Qt::Key_O );
QCOMPARE( mLayerCompoundCurve->undoStack()->index(), 3 );
QCOMPARE( mLayerCompoundCurve->getFeature( mFidCompoundCurveF1 ).geometry(), QgsGeometry::fromWkt( "CompoundCurve ((14 14, 10 10, 17 10))" ) );
mLayerCompoundCurve->undoStack()->undo();

0 comments on commit e205ce8

Please sign in to comment.