Skip to content
Permalink
Browse files

Fix SIP type handling for QgsColorScheme subclasses

  • Loading branch information
nyalldawson committed Dec 7, 2015
1 parent 930b485 commit de1001b9f78dedc511be1b5de594308efdf686de
Showing with 15 additions and 0 deletions.
  1. +15 −0 python/core/qgscolorscheme.sip
@@ -16,6 +16,21 @@ class QgsColorScheme
#include <qgscolorscheme.h>
%End

%ConvertToSubClassCode
if (dynamic_cast<QgsUserColorScheme*>(sipCpp) != NULL)
sipType = sipType_QgsUserColorScheme;
else if (dynamic_cast<QgsRecentColorScheme*>(sipCpp) != NULL)
sipType = sipType_QgsRecentColorScheme;
else if (dynamic_cast<QgsCustomColorScheme*>(sipCpp) != NULL)
sipType = sipType_QgsCustomColorScheme;
else if (dynamic_cast<QgsProjectColorScheme*>(sipCpp) != NULL)
sipType = sipType_QgsProjectColorScheme;
else if (dynamic_cast<QgsGplColorScheme*>(sipCpp) != NULL)
sipType = sipType_QgsGplColorScheme;
else
sipType = sipType_QgsColorScheme;
%End

public:

/** Flags for controlling behaviour of color scheme

0 comments on commit de1001b

Please sign in to comment.
You can’t perform that action at this time.