diff --git a/python/core/symbology-ng-core.sip b/python/core/symbology-ng-core.sip index c57d8758cab..f567e8ea339 100644 --- a/python/core/symbology-ng-core.sip +++ b/python/core/symbology-ng-core.sip @@ -34,6 +34,19 @@ class QgsFeatureRendererV2 #include %End + +%ConvertToSubClassCode + if (sipCpp->type() == "singleSymbol") + sipClass = sipClass_QgsSingleSymbolRendererV2; + else if (sipCpp->type() == "categorizedSymbol") + sipClass = sipClass_QgsCategorizedSymbolRendererV2; + else if (sipCpp->type() == "graduatedSymbol") + sipClass = sipClass_QgsGraduatedSymbolRendererV2; + else + sipClass = 0; +%End + + public: //! return a new renderer - used by default in vector layers