Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Protected -> Private
  • Loading branch information
m-kuhn committed Jul 6, 2017
1 parent 11e24c2 commit 91f908f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/app/qgsmaptooladdfeature.cpp
Expand Up @@ -68,6 +68,16 @@ void QgsMapToolAddFeature::activate()
QgsMapToolCapture::activate();
}

bool QgsMapToolAddFeature::checkGeometryType() const
{
return mCheckGeometryType;
}

void QgsMapToolAddFeature::setCheckGeometryType( bool checkGeometryType )
{
mCheckGeometryType = checkGeometryType;
}

void QgsMapToolAddFeature::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
{
QgsVectorLayer *vlayer = currentVectorLayer();
Expand Down
17 changes: 16 additions & 1 deletion src/app/qgsmaptooladdfeature.h
Expand Up @@ -31,7 +31,22 @@ class APP_EXPORT QgsMapToolAddFeature : public QgsMapToolCapture

protected:

/** Check if CaptureMode match layer type. Default is true.
/**
* Check if CaptureMode matches layer type. Default is true.
* \since QGIS 3.0
*/
bool checkGeometryType() const;

/**
* Check if CaptureMode matches layer type. Default is true.
* \since QGIS 3.0
*/
void setCheckGeometryType( bool checkGeometryType );

private:
QVariant snappingMatchesAsVariable() const;

/** Check if CaptureMode matches layer type. Default is true.
* \since QGIS 2.12 */
bool mCheckGeometryType;
};
2 changes: 1 addition & 1 deletion src/plugins/grass/qgsgrassaddfeature.cpp
Expand Up @@ -19,7 +19,7 @@
QgsGrassAddFeature::QgsGrassAddFeature( QgsMapCanvas *canvas, CaptureMode mode )
: QgsMapToolAddFeature( canvas, mode )
{
mCheckGeometryType = false;
setCheckGeometryType( false );
}

QgsGrassAddFeature::~QgsGrassAddFeature()
Expand Down

0 comments on commit 91f908f

Please sign in to comment.