[Greater-commits] r310 - trunk/GREAT-ER/Thuban/UI

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jun 29 17:15:48 CEST 2011


Author: aheinecke
Date: 2011-06-29 17:15:48 +0200 (Wed, 29 Jun 2011)
New Revision: 310

Modified:
   trunk/GREAT-ER/Thuban/UI/renderer.py
Log:
Do not use wxProj rendering methos when there are not projections for the layers


Modified: trunk/GREAT-ER/Thuban/UI/renderer.py
===================================================================
--- trunk/GREAT-ER/Thuban/UI/renderer.py	2011-06-29 14:51:54 UTC (rev 309)
+++ trunk/GREAT-ER/Thuban/UI/renderer.py	2011-06-29 15:15:48 UTC (rev 310)
@@ -88,15 +88,16 @@
         """Override inherited method to provide more efficient renderers
 
         If the underlying data format is not a shapefile or the layer
-        contains points shapes, simply use what the inherited method
-        returns.
+        contains points shapes, or the layer has no projection
+        simply use what the inherited method returns.
 
         Otherwise, i.e. for arc and polygon use the more efficient
         wxproj.draw_polygon_shape and its corresponding parameter
         created with wxproj.draw_polygon_init.
         """
         if (layer.ShapeStore().RawShapeFormat() == RAW_SHAPEFILE
-            and layer.ShapeType() in (SHAPETYPE_ARC, SHAPETYPE_POLYGON)):
+            and layer.ShapeType() in (SHAPETYPE_ARC, SHAPETYPE_POLYGON)
+            and layer.projection and self.map.projection:
             offx, offy = self.offset
             x = lambda a, b, c, d: None
             #return (True, x, None)



More information about the Greater-commits mailing list