[GRASS-SVN] r53527 - grass/trunk/gui/wxpython/mapdisp
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Oct 23 00:11:08 PDT 2012
Author: annakrat
Date: 2012-10-23 00:11:08 -0700 (Tue, 23 Oct 2012)
New Revision: 53527
Modified:
grass/trunk/gui/wxpython/mapdisp/mapwindow.py
grass/trunk/gui/wxpython/mapdisp/statusbar.py
Log:
wxGUI: fixed #1766
Modified: grass/trunk/gui/wxpython/mapdisp/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/mapwindow.py 2012-10-22 21:41:18 UTC (rev 53526)
+++ grass/trunk/gui/wxpython/mapdisp/mapwindow.py 2012-10-23 07:11:08 UTC (rev 53527)
@@ -475,7 +475,7 @@
self.Map.ChangeMapSize((width, height))
ibuffer = wx.EmptyBitmap(max(1, width), max(1, height))
- self.Map.Render(force = True, windres = False)
+ self.Map.Render(force = True, windres = self.frame.GetProperty('resolution'))
img = self.GetImage()
self.pdc.RemoveAll()
self.Draw(self.pdc, img, drawid = 99)
Modified: grass/trunk/gui/wxpython/mapdisp/statusbar.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/statusbar.py 2012-10-22 21:41:18 UTC (rev 53526)
+++ grass/trunk/gui/wxpython/mapdisp/statusbar.py 2012-10-23 07:11:08 UTC (rev 53527)
@@ -31,6 +31,7 @@
@author Anna Kratochvilova <kratochanna gmail.com>
"""
+import copy
import wx
from wx.lib.newevent import NewEvent
@@ -770,7 +771,13 @@
self.label = _("Display geometry")
def Show(self):
- region = self.mapFrame.GetMap().GetCurrentRegion()
+ region = copy.copy(self.mapFrame.GetMap().GetCurrentRegion())
+ if self.mapFrame.GetProperty('resolution'):
+ compRegion = self.mapFrame.GetMap().GetRegion(add3d = False)
+ region['rows'] = abs(int((region['n'] - region['s']) / compRegion['nsres']) + 0.5)
+ region['cols'] = abs(int((region['e'] - region['w']) / compRegion['ewres']) + 0.5)
+ region['nsres'] = compRegion['nsres']
+ region['ewres'] = compRegion['ewres']
self.SetValue("rows=%d; cols=%d; nsres=%.2f; ewres=%.2f" %
(region["rows"], region["cols"],
region["nsres"], region["ewres"]))
More information about the grass-commit
mailing list