[GRASS-SVN] r39440 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Oct 8 06:38:31 EDT 2009
Author: martinl
Date: 2009-10-08 06:38:31 -0400 (Thu, 08 Oct 2009)
New Revision: 39440
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py
Log:
wxGUI: fix pseudodc
(merge r39439 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py 2009-10-08 10:35:52 UTC (rev 39439)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py 2009-10-08 10:38:31 UTC (rev 39440)
@@ -243,20 +243,24 @@
@vdigit True to use PseudoDC from vdigit
"""
- if vdigit:
- PseudoDC = VDigitPseudoDC
- else:
- PseudoDC = wx.PseudoDC
-
# create PseudoDC used for background map, map decorations like scales and legends
- self.pdc = PseudoDC()
+ self.pdc = self.PseudoDC(vdigit)
# used for digitization tool
self.pdcVector = None
# decorations (region box, etc.)
- self.pdcDec = PseudoDC()
+ self.pdcDec = self.PseudoDC(vdigit)
# pseudoDC for temporal objects (select box, measurement tool, etc.)
- self.pdcTmp = PseudoDC()
+ self.pdcTmp = self.PseudoDC(vdigit)
+ def PseudoDC(self, vdigit = False):
+ """!Create PseudoDC instance"""
+ if vdigit:
+ PseudoDC = VDigitPseudoDC
+ else:
+ PseudoDC = wx.PseudoDC
+
+ return PseudoDC()
+
def CheckPseudoDC(self):
"""!Try to draw background
@@ -506,7 +510,7 @@
# self.bufferLast = wx.BitmapFromImage(self.buffer.ConvertToImage())
self.bufferLast = dc.GetAsBitmap(wx.Rect(0, 0, self.Map.width, self.Map.height))
- pdcLast = PseudoDC()
+ pdcLast = self.PseudoDC(vdigit = False)
pdcLast.DrawBitmap(self.bufferLast, 0, 0, False)
pdcLast.DrawToDC(dc)
More information about the grass-commit
mailing list