Skip to content

Commit

Permalink
remove useless variable mSnappedToVertex
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti authored and nyalldawson committed Mar 13, 2019
1 parent db482f9 commit 4bc7c5b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions src/gui/qgsadvanceddigitizingdockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,6 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent *e )

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

mSnappedToVertex = mSnapMatch.hasVertex();

// update the point list
updateCurrentPoint( point );

Expand Down Expand Up @@ -1028,7 +1026,6 @@ void QgsAdvancedDigitizingDockWidget::clearPoints()
{
mCadPointList.clear();
mSnappedSegment.clear();
mSnappedToVertex = false;

updateCapacity();
}
Expand Down
3 changes: 1 addition & 2 deletions src/gui/qgsadvanceddigitizingdockwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class GUI_EXPORT QgsAdvancedDigitizingDockWidget : public QgsDockWidget, private
/**
* Is it snapped to a vertex
*/
inline bool snappedToVertex() const { return mSnappedToVertex; }
inline bool snappedToVertex() const { return ( mSnapMatch.isValid() && mSnapMatch.hasVertex() ); }

/**
* Snapped to a segment
Expand Down Expand Up @@ -484,7 +484,6 @@ class GUI_EXPORT QgsAdvancedDigitizingDockWidget : public QgsDockWidget, private
// point list and current snap point / segment
QList<QgsPointXY> mCadPointList;
QList<QgsPointXY> mSnappedSegment;
bool mSnappedToVertex = false;

bool mSessionActive = false;

Expand Down

0 comments on commit 4bc7c5b

Please sign in to comment.