Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add reactivated signal
  • Loading branch information
YoannQDQ authored and nyalldawson committed Apr 24, 2023
1 parent 9e3d591 commit 8e5cb7d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions python/gui/auto_generated/qgsmaptool.sip.in
Expand Up @@ -297,6 +297,12 @@ signal emitted once the map tool is activated
void deactivated();
%Docstring
signal emitted once the map tool is deactivated
%End

void reactivated();
%Docstring

.. versionadded:: 3.32
%End

protected:
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsmeasuretool.cpp
Expand Up @@ -103,6 +103,7 @@ void QgsMeasureTool::reactivate()
// User clicked on the measure action while it was already active
// Only ensure that the dialog is visible
mDialog->show();
QgsMapTool::reactivate();
}

void QgsMeasureTool::restart()
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmaptool.cpp
Expand Up @@ -120,7 +120,7 @@ void QgsMapTool::deactivate()

void QgsMapTool::reactivate()
{

emit reactivated();
}

void QgsMapTool::clean()
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgsmaptool.h
Expand Up @@ -287,6 +287,9 @@ class GUI_EXPORT QgsMapTool : public QObject
//! signal emitted once the map tool is deactivated
void deactivated();

//! \since QGIS 3.32 signal emitted when the map tool is activated while it is already active
void reactivated();

private slots:
//! clear pointer when action is destroyed
void actionDestroyed();
Expand Down

0 comments on commit 8e5cb7d

Please sign in to comment.