mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
Fix casting
This commit is contained in:
parent
a999b95f10
commit
06087eebee
@ -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<QgsPlotToolPan *>( sipCpp ) != nullptr )
|
||||
sipType = sipType_QgsPlotToolPan;
|
||||
else if ( qobject_cast<QgsPlotToolZoom *>( sipCpp ) != nullptr )
|
||||
sipType = sipType_QgsPlotToolZoom;
|
||||
else if ( qobject_cast<QgsPlotTool *>( sipCpp ) != nullptr )
|
||||
sipType = sipType_QgsPlotTool;
|
||||
else
|
||||
|
@ -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<QgsPlotToolPan *>( sipCpp ) != nullptr )
|
||||
sipType = sipType_QgsPlotToolPan;
|
||||
else if ( qobject_cast<QgsPlotToolZoom *>( sipCpp ) != nullptr )
|
||||
sipType = sipType_QgsPlotToolZoom;
|
||||
else if ( qobject_cast<QgsPlotTool *>( sipCpp ) != nullptr )
|
||||
sipType = sipType_QgsPlotTool;
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user