[GRASS-SVN] r57079 - grass/trunk/gui/wxpython/mapdisp
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jul 13 08:49:11 PDT 2013
Author: wenzeslaus
Date: 2013-07-13 08:49:10 -0700 (Sat, 13 Jul 2013)
New Revision: 57079
Modified:
grass/trunk/gui/wxpython/mapdisp/mapwindow.py
Log:
wxGUI/mapdisp: improving handling of zoom history
Modified: grass/trunk/gui/wxpython/mapdisp/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/mapwindow.py 2013-07-13 15:47:04 UTC (rev 57078)
+++ grass/trunk/gui/wxpython/mapdisp/mapwindow.py 2013-07-13 15:49:10 UTC (rev 57079)
@@ -1524,6 +1524,8 @@
Emits zoomChanged signal.
Emits zoomHistoryUnavailable signal when stack is empty.
"""
+ Debug.msg(4, "BufferedWindow.ZoomBack(): hist)=%s" % self.zoomhistory)
+
zoom = list()
if len(self.zoomhistory) > 1:
@@ -1579,6 +1581,26 @@
return removed
+ def InitZoomHistory(self):
+ """Initializes zoom history.
+
+ @todo First item is handled in some special way. Improve the
+ documentation or fix the code.
+
+ It does not emits any signals.
+
+ This method can be possibly removed when the history will solve the
+ fist item in different way or when GCP manager (and possibly others)
+ will handle Map variable in the way that it will be prepared for
+ MapWindow/BufferedWindow and thus usable to initialize history.
+ """
+ self.zoomhistory.append((self.Map.region['n'],
+ self.Map.region['s'],
+ self.Map.region['e'],
+ self.Map.region['w']))
+ Debug.msg(4, "BufferedWindow.InitZoomHistory(): hist=%s" %
+ (self.zoomhistory))
+
def ResetZoomHistory(self):
"""!Reset zoom history"""
self.zoomhistory = list()
More information about the grass-commit
mailing list