From 06087eebeeb3079acba7c0c1553504c07c534a1c Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 7 Apr 2022 14:48:38 +1000 Subject: [PATCH] Fix casting --- python/gui/auto_generated/plot/qgsplottool.sip.in | 5 ++++- src/gui/plot/qgsplottool.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/python/gui/auto_generated/plot/qgsplottool.sip.in b/python/gui/auto_generated/plot/qgsplottool.sip.in index a6d0dfbfa3a..ab9e8b3e3a5 100644 --- a/python/gui/auto_generated/plot/qgsplottool.sip.in +++ b/python/gui/auto_generated/plot/qgsplottool.sip.in @@ -14,7 +14,8 @@ %ModuleHeaderCode #include "qgsplottool.h" -#include "qgsplotpantool.h" +#include "qgsplottoolpan.h" +#include "qgsplottoolzoom.h" %End @@ -34,6 +35,8 @@ Plot tools are user tools for manipulating and interacting with a :py:class:`Qgs %ConvertToSubClassCode if ( qobject_cast( sipCpp ) != nullptr ) sipType = sipType_QgsPlotToolPan; + else if ( qobject_cast( sipCpp ) != nullptr ) + sipType = sipType_QgsPlotToolZoom; else if ( qobject_cast( sipCpp ) != nullptr ) sipType = sipType_QgsPlotTool; else diff --git a/src/gui/plot/qgsplottool.h b/src/gui/plot/qgsplottool.h index df27943487c..c89471ec4b9 100644 --- a/src/gui/plot/qgsplottool.h +++ b/src/gui/plot/qgsplottool.h @@ -41,7 +41,8 @@ class QAction; #ifdef SIP_RUN % ModuleHeaderCode #include "qgsplottool.h" -#include "qgsplotpantool.h" +#include "qgsplottoolpan.h" +#include "qgsplottoolzoom.h" % End #endif @@ -60,6 +61,8 @@ class GUI_EXPORT QgsPlotTool : public QObject SIP_CONVERT_TO_SUBCLASS_CODE if ( qobject_cast( sipCpp ) != nullptr ) sipType = sipType_QgsPlotToolPan; + else if ( qobject_cast( sipCpp ) != nullptr ) + sipType = sipType_QgsPlotToolZoom; else if ( qobject_cast( sipCpp ) != nullptr ) sipType = sipType_QgsPlotTool; else