[QGIS Commit] r12357 - trunk/qgis/python/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Dec 7 13:18:31 EST 2009


Author: wonder
Date: 2009-12-07 13:18:30 -0500 (Mon, 07 Dec 2009)
New Revision: 12357

Modified:
   trunk/qgis/python/core/symbology-ng-core.sip
Log:
Fixed conversion to subclasses of QgsFeatureRendererV2


Modified: trunk/qgis/python/core/symbology-ng-core.sip
===================================================================
--- trunk/qgis/python/core/symbology-ng-core.sip	2009-12-07 17:56:40 UTC (rev 12356)
+++ trunk/qgis/python/core/symbology-ng-core.sip	2009-12-07 18:18:30 UTC (rev 12357)
@@ -34,6 +34,19 @@
 #include <qgsrendererv2.h>
 %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



More information about the QGIS-commit mailing list