Skip to content

Commit 784ddd9

Browse files
committedMay 14, 2020
[tracing curves] (cleanup & test)
1 parent 936cc21 commit 784ddd9

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed
 

‎src/gui/qgsmaptoolcapture.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "qgsmapcanvas.h"
2424
#include "qgsmapcanvastracer.h"
2525
#include "qgsmapmouseevent.h"
26-
#include "qgsogrutils.h"
2726
#include "qgspolygon.h"
2827
#include "qgsrubberband.h"
2928
#include "qgssnapindicator.h"

‎tests/src/app/testqgsmaptooladdfeatureline.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ void TestQgsMapToolAddFeatureLine::testTracing()
302302
mEnableTracingAction->setChecked( false );
303303
}
304304

305-
306305
void TestQgsMapToolAddFeatureLine::testTracingWithOffset()
307306
{
308307
TestQgsMapToolAdvancedDigitizingUtils utils( mCaptureTool );
@@ -381,7 +380,6 @@ void TestQgsMapToolAddFeatureLine::testTracingWithOffset()
381380
mEnableTracingAction->setChecked( false );
382381
}
383382

384-
385383
void TestQgsMapToolAddFeatureLine::testTracingWithConvertToCurves()
386384
{
387385
TestQgsMapToolAdvancedDigitizingUtils utils( mCaptureTool );
@@ -403,8 +401,8 @@ void TestQgsMapToolAddFeatureLine::testTracingWithConvertToCurves()
403401
QgsFeatureId newFid1 = utils.newFeatureId( oldFids );
404402

405403
const QgsAbstractGeometry *g = mLayerLineCurved->getFeature( newFid1 ).geometry().constGet();
406-
QCOMPARE( g->vertexAt( QgsVertexId( 0, 0, 0 ) ), QgsPointXY( 6, 1 ) );
407-
QCOMPARE( g->vertexAt( QgsVertexId( 0, 0, g->vertexCount() - 1 ) ), QgsPointXY( 7, 1 ) );
404+
QCOMPARE( g->vertexAt( QgsVertexId( 0, 0, 0 ) ), QgsPoint( 6, 1 ) );
405+
QCOMPARE( g->vertexAt( QgsVertexId( 0, 0, g->vertexCount() - 1 ) ), QgsPoint( 7, 1 ) );
408406
QVERIFY( g->vertexCount() > 3 ); // a segmentized arc has (much) more than 3 points
409407

410408
mLayerLineCurved->undoStack()->undo();
@@ -420,8 +418,8 @@ void TestQgsMapToolAddFeatureLine::testTracingWithConvertToCurves()
420418
QgsFeatureId newFid2 = utils.newFeatureId( oldFids );
421419

422420
g = mLayerLineCurved->getFeature( newFid2 ).geometry().constGet();
423-
QCOMPARE( g->vertexAt( QgsVertexId( 0, 0, 0 ) ), QgsPointXY( 6, 1 ) );
424-
QCOMPARE( g->vertexAt( QgsVertexId( 0, 0, g->vertexCount() - 1 ) ), QgsPointXY( 7, 1 ) );
421+
QCOMPARE( g->vertexAt( QgsVertexId( 0, 0, 0 ) ), QgsPoint( 6, 1 ) );
422+
QCOMPARE( g->vertexAt( QgsVertexId( 0, 0, g->vertexCount() - 1 ) ), QgsPoint( 7, 1 ) );
425423
QVERIFY( g->vertexCount() == 3 ); // a true arc is composed of 3 vertices
426424

427425
mLayerLineCurved->undoStack()->undo();
@@ -432,7 +430,6 @@ void TestQgsMapToolAddFeatureLine::testTracingWithConvertToCurves()
432430
mEnableTracingAction->setChecked( false );
433431
}
434432

435-
436433
void TestQgsMapToolAddFeatureLine::testZ()
437434
{
438435
TestQgsMapToolAdvancedDigitizingUtils utils( mCaptureTool );

0 commit comments

Comments
 (0)
Please sign in to comment.