Skip to content

Commit 1ac18f9

Browse files
lbartolettiwonder-sk
authored andcommittedMar 12, 2019
remove useless variable mSnappedToVertex
1 parent 2a2b7a6 commit 1ac18f9

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed
 

‎src/gui/qgsadvanceddigitizingdockwidget.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,6 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent *e )
555555

556556
mSnapMatch = context.snappingUtils->snapToMap( point );
557557

558-
mSnappedToVertex = mSnapMatch.hasVertex();
559-
560558
// update the point list
561559
updateCurrentPoint( point );
562560

@@ -1028,7 +1026,6 @@ void QgsAdvancedDigitizingDockWidget::clearPoints()
10281026
{
10291027
mCadPointList.clear();
10301028
mSnappedSegment.clear();
1031-
mSnappedToVertex = false;
10321029

10331030
updateCapacity();
10341031
}

‎src/gui/qgsadvanceddigitizingdockwidget.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ class GUI_EXPORT QgsAdvancedDigitizingDockWidget : public QgsDockWidget, private
317317
/**
318318
* Is it snapped to a vertex
319319
*/
320-
inline bool snappedToVertex() const { return mSnappedToVertex; }
320+
inline bool snappedToVertex() const { return ( mSnapMatch.isValid() && mSnapMatch.hasVertex() ); }
321321

322322
/**
323323
* Snapped to a segment
@@ -485,7 +485,6 @@ class GUI_EXPORT QgsAdvancedDigitizingDockWidget : public QgsDockWidget, private
485485
// point list and current snap point / segment
486486
QList<QgsPointXY> mCadPointList;
487487
QList<QgsPointXY> mSnappedSegment;
488-
bool mSnappedToVertex = false;
489488

490489
bool mSessionActive = false;
491490

0 commit comments

Comments
 (0)
Please sign in to comment.