Skip to content

Commit e205ce8

Browse files
olivierdalangnyalldawson
authored andcommitted
[convert to curve] fix test
(change of key and key now cancels dragging vertex)
1 parent b0590e9 commit e205ce8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/src/app/testqgsvertextool.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -808,12 +808,10 @@ void TestQgsVertexTool::testConvertVertex()
808808
// convert vertex in compoundCurve while moving vertex
809809
QCOMPARE( mLayerCompoundCurve->getFeature( mFidCompoundCurveF1 ).geometry(), QgsGeometry::fromWkt( "CompoundCurve ( CircularString (14 14, 10 10, 17 10))" ) );
810810
mouseClick( 10, 10, Qt::LeftButton );
811-
keyClick( Qt::Key_C );
812-
mouseClick( 10, 10, Qt::LeftButton );
813-
QCOMPARE( mLayerCompoundCurve->undoStack()->index(), 4 ); // one undo for move, one undo for convert
811+
keyClick( Qt::Key_O );
812+
QCOMPARE( mLayerCompoundCurve->undoStack()->index(), 3 );
814813
QCOMPARE( mLayerCompoundCurve->getFeature( mFidCompoundCurveF1 ).geometry(), QgsGeometry::fromWkt( "CompoundCurve ((14 14, 10 10, 17 10))" ) );
815814
mLayerCompoundCurve->undoStack()->undo();
816-
mLayerCompoundCurve->undoStack()->undo();
817815
QCOMPARE( mLayerCompoundCurve->undoStack()->index(), 2 );
818816
QCOMPARE( mLayerCompoundCurve->getFeature( mFidCompoundCurveF1 ).geometry(), QgsGeometry::fromWkt( "CompoundCurve ( CircularString (14 14, 10 10, 17 10))" ) );
819817

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

0 commit comments

Comments
 (0)