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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Jul 15 16:06:58 CEST 2011


Author: aheinecke
Date: 2011-07-15 16:06:58 +0200 (Fri, 15 Jul 2011)
New Revision: 3604

Modified:
   trunk/GREAT-ER/Thuban/UI/view.py
Log:
MapCanvas.Export: Replace the GetSizeTuple function of the wxMetaFileDC
with the GetSizeTuple of the MapCanvas. Since wxMetaFileDC describes a file
it has no size and in wxWidgets 2.8 this always returned 0,0 thus breaking
the Export function. Using the MapCanvas Size as the Size of the MetaFile
restores the intended behavior.


Modified: trunk/GREAT-ER/Thuban/UI/view.py
===================================================================
--- trunk/GREAT-ER/Thuban/UI/view.py	2011-07-15 09:06:01 UTC (rev 3603)
+++ trunk/GREAT-ER/Thuban/UI/view.py	2011-07-15 14:06:58 UTC (rev 3604)
@@ -292,6 +292,7 @@
             path = internal_from_wxstring(dlg.GetPath())
             self.export_path = os.path.dirname(path)
             dc = wx.MetaFileDC(path)
+            dc.GetSizeTuple = self.GetSizeTuple
 
             scale, offset, mapregion = output_transform(self.scale,
                                                         self.offset,



More information about the Greater-commits mailing list