Skip to content

Commit

Permalink
[selfsnap] apply pr review
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierdalang committed May 26, 2020
1 parent 02c7a9a commit 47fdd4b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgssnappingutils.sip.in
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgssnappingwidget.cpp
Expand Up @@ -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 );

Expand Down
5 changes: 4 additions & 1 deletion src/core/qgscadutils.h
Expand Up @@ -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;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgssnappingutils.h
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsmaptoolcapture.cpp
Expand Up @@ -72,6 +72,7 @@ QgsMapToolCapture::~QgsMapToolCapture()
mValidator->deleteLater();
mValidator = nullptr;
}
mCanvas->snappingUtils()->removeExtraSnapLayer( mExtraSnapLayer );
mExtraSnapLayer->deleteLater();
mExtraSnapLayer = nullptr;
}
Expand Down

0 comments on commit 47fdd4b

Please sign in to comment.