Skip to content

Commit

Permalink
Add some more SIP downcasts for map tools
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 18, 2021
1 parent 1f8aa46 commit a81b872
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions python/gui/auto_generated/qgsmaptool.sip.in
Expand Up @@ -21,6 +21,11 @@
#include <qgsmaptoolemitpoint.h>
#include <qgsmaptoolidentify.h>
#include <qgsmaptooldigitizefeature.h>
#include <qgsmaptoolextent.h>
#include <qgsmaptoolidentifyfeature.h>
#include <qgsmaptoolcapture.h>
#include <qgsmaptooladvanceddigitizing.h>
#include <qgsmaptooledit.h>
%End

class QgsMapTool : QObject
Expand All @@ -42,10 +47,20 @@ implemented as map tools.
sipType = sipType_QgsMapToolPan;
else if ( dynamic_cast<QgsMapToolEmitPoint *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolEmitPoint;
else if ( dynamic_cast<QgsMapToolExtent *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolExtent;
else if ( dynamic_cast<QgsMapToolIdentifyFeature *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolIdentifyFeature;
else if ( dynamic_cast<QgsMapToolIdentify *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolIdentify;
else if ( dynamic_cast<QgsMapToolDigitizeFeature *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolDigitizeFeature;
else if ( dynamic_cast<QgsMapToolCapture *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolCapture;
else if ( dynamic_cast<QgsMapToolAdvancedDigitizing *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolAdvancedDigitizing;
else if ( dynamic_cast<QgsMapToolEdit *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolEdit;
else
sipType = NULL;
%End
Expand Down
15 changes: 15 additions & 0 deletions src/gui/qgsmaptool.h
Expand Up @@ -52,6 +52,11 @@ class QMenu;
#include <qgsmaptoolemitpoint.h>
#include <qgsmaptoolidentify.h>
#include <qgsmaptooldigitizefeature.h>
#include <qgsmaptoolextent.h>
#include <qgsmaptoolidentifyfeature.h>
#include <qgsmaptoolcapture.h>
#include <qgsmaptooladvanceddigitizing.h>
#include <qgsmaptooledit.h>
% End
#endif

Expand All @@ -73,10 +78,20 @@ class GUI_EXPORT QgsMapTool : public QObject
sipType = sipType_QgsMapToolPan;
else if ( dynamic_cast<QgsMapToolEmitPoint *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolEmitPoint;
else if ( dynamic_cast<QgsMapToolExtent *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolExtent;
else if ( dynamic_cast<QgsMapToolIdentifyFeature *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolIdentifyFeature;
else if ( dynamic_cast<QgsMapToolIdentify *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolIdentify;
else if ( dynamic_cast<QgsMapToolDigitizeFeature *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolDigitizeFeature;
else if ( dynamic_cast<QgsMapToolCapture *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolCapture;
else if ( dynamic_cast<QgsMapToolAdvancedDigitizing *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolAdvancedDigitizing;
else if ( dynamic_cast<QgsMapToolEdit *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolEdit;
else
sipType = NULL;
SIP_END
Expand Down

0 comments on commit a81b872

Please sign in to comment.