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 wonder-sk committed Mar 12, 2019
1 parent 2a2b7a6 commit 1ac18f9
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 @@ -317,7 +317,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 @@ -485,7 +485,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 1ac18f9

Please sign in to comment.