Skip to content

Commit 3a360ac

Browse files
committed
remove useless variable mSnappedToVertex
1 parent 09c1c64 commit 3a360ac

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/gui/qgsadvanceddigitizingdockwidget.cpp

-3
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

+1-2
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ class GUI_EXPORT QgsAdvancedDigitizingDockWidget : public QgsDockWidget, private
316316
/**
317317
* Is it snapped to a vertex
318318
*/
319-
inline bool snappedToVertex() const { return mSnappedToVertex; }
319+
inline bool snappedToVertex() const { return ( mSnapMatch.isValid() && mSnapMatch.hasVertex() ); }
320320

321321
/**
322322
* Snapped to a segment
@@ -484,7 +484,6 @@ class GUI_EXPORT QgsAdvancedDigitizingDockWidget : public QgsDockWidget, private
484484
// point list and current snap point / segment
485485
QList<QgsPointXY> mCadPointList;
486486
QList<QgsPointXY> mSnappedSegment;
487-
bool mSnappedToVertex = false;
488487

489488
bool mSessionActive = false;
490489

0 commit comments

Comments
 (0)