Skip to content
Permalink
Browse files

[selfsnap] apply pr review

  • Loading branch information
olivierdalang committed May 26, 2020
1 parent 02c7a9a commit 47fdd4b4d158a9f4f21763f9495448a78144bd9f
@@ -169,7 +169,7 @@ Set if invisible features must be snapped or not.
void addExtraSnapLayer( QgsVectorLayer *vl );
%Docstring
Supply an extra snapping layer (typically a memory layer).
This is can be used by map tools to provide additionnal
This can be used by map tools to provide additionnal
snappings points.

.. seealso:: :py:func:`removeExtraSnapLayer`
@@ -291,7 +291,7 @@ QgsSnappingWidget::QgsSnappingWidget( QgsProject *project, QgsMapCanvas *canvas,
mSelfSnappingAction = new QAction( tr( "Self-snapping" ), this );
mSelfSnappingAction->setCheckable( true );
mSelfSnappingAction->setIcon( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingSelf.svg" ) ) );
mSelfSnappingAction->setToolTip( tr( "Enable Self-snapping" ) );
mSelfSnappingAction->setToolTip( tr( "If self snapping is enabled, snapping will also take the current state of the digitized feature into consideration." ) );
mSelfSnappingAction->setObjectName( QStringLiteral( "SelfSnappingAction" ) );
connect( mSelfSnappingAction, &QAction::toggled, this, &QgsSnappingWidget::enableSelfSnapping );

@@ -92,7 +92,10 @@ class CORE_EXPORT QgsCadUtils
//! map point aligned according to the constraints
QgsPointXY finalMapPoint;

//! Snapped point - only valid if actually used for something
/**
* Snapped point - only valid if actually used for something
* \since QGIS 3.14
*/
QgsPointLocator::Match snapMatch;

/**
@@ -187,7 +187,7 @@ class CORE_EXPORT QgsSnappingUtils : public QObject

/**
* Supply an extra snapping layer (typically a memory layer).
* This is can be used by map tools to provide additionnal
* This can be used by map tools to provide additionnal
* snappings points.
*
* \see removeExtraSnapLayer()
@@ -72,6 +72,7 @@ QgsMapToolCapture::~QgsMapToolCapture()
mValidator->deleteLater();
mValidator = nullptr;
}
mCanvas->snappingUtils()->removeExtraSnapLayer( mExtraSnapLayer );
mExtraSnapLayer->deleteLater();
mExtraSnapLayer = nullptr;
}

0 comments on commit 47fdd4b

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