Skip to content
Permalink
Browse files

Simplify code

  • Loading branch information
m-kuhn committed Aug 24, 2018
1 parent b6fbdec commit dea911dcbcdaf8f725c2d99eb4a854936f043ef7
Showing with 1 addition and 6 deletions.
  1. +1 −4 src/gui/qgsmaptoolcapture.cpp
  2. +0 −2 src/gui/qgsmaptoolcapture.h
@@ -42,7 +42,6 @@ QgsMapToolCapture::QgsMapToolCapture( QgsMapCanvas *canvas, QgsAdvancedDigitizin
: QgsMapToolAdvancedDigitizing( canvas, cadDockWidget )
, mCaptureMode( mode )
{
mCaptureModeFromLayer = mode == CaptureNone;
mCapturing = false;

mSnapIndicator.reset( new QgsSnapIndicator( canvas ) );
@@ -96,11 +95,9 @@ void QgsMapToolCapture::validationFinished()

void QgsMapToolCapture::currentLayerChanged( QgsMapLayer *layer )
{
if ( !mCaptureModeFromLayer )
if ( mCaptureMode != CaptureNone )
return;

mCaptureMode = CaptureNone;

QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( layer );
if ( !vlayer )
{
@@ -268,8 +268,6 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
QList< QgsGeometry::Error > mGeomErrors;
QList< QgsVertexMarker * > mGeomErrorMarkers;

bool mCaptureModeFromLayer;

std::unique_ptr<QgsSnapIndicator> mSnapIndicator;

/**

0 comments on commit dea911d

Please sign in to comment.
You can’t perform that action at this time.