[Thuban-commits] r2892 - trunk/thuban/Thuban/UI
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jul 14 12:46:42 CEST 2011
Author: bricks
Date: 2011-07-14 12:46:42 +0200 (Thu, 14 Jul 2011)
New Revision: 2892
Modified:
trunk/thuban/Thuban/UI/renderer.py
Log:
Render correctly if projection can't be found
Modified: trunk/thuban/Thuban/UI/renderer.py
===================================================================
--- trunk/thuban/Thuban/UI/renderer.py 2011-07-14 10:45:33 UTC (rev 2891)
+++ trunk/thuban/Thuban/UI/renderer.py 2011-07-14 10:46:42 UTC (rev 2892)
@@ -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 Thuban-commits
mailing list