[GRASS-SVN] r57387 - grass/trunk/gui/wxpython/mapdisp

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 3 14:57:45 PDT 2013


Author: wenzeslaus
Date: 2013-08-03 14:57:44 -0700 (Sat, 03 Aug 2013)
New Revision: 57387

Modified:
   grass/trunk/gui/wxpython/mapdisp/frame.py
   grass/trunk/gui/wxpython/mapdisp/mapwindow.py
Log:
wxGUI/mapwindow: frame parameter added to the BufferedWindow (fixing r57385), todos added

Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py	2013-08-03 21:46:19 UTC (rev 57386)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py	2013-08-03 21:57:44 UTC (rev 57387)
@@ -559,7 +559,8 @@
         # change the cursor
         self.MapWindow.SetCursor(self.cursors["hand"])
         self.MapWindow.SetFocus()
-        
+    
+    # TODO: can be replaced/merged by ZoomToWind
     def OnZoomRegion(self, event):
         """!Zoom to region
         """
@@ -568,6 +569,7 @@
         self.UpdateMap()
         # event.Skip()
 
+    # TODO: delete this here and in gcp
     def OnAlignRegion(self, event):
         """!Align region
         """
@@ -979,6 +981,7 @@
         # the desired raster) is selected to be profiled
         win.OnSelectRaster(None)
 
+    # TODO: move somewhere where can be reused (utils?), remove from gcp
     def FormatDist(self, dist):
         """!Format length numbers and units in a nice way,
         as a function of length. From code by Hamish Bowman

Modified: grass/trunk/gui/wxpython/mapdisp/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/mapwindow.py	2013-08-03 21:46:19 UTC (rev 57386)
+++ grass/trunk/gui/wxpython/mapdisp/mapwindow.py	2013-08-03 21:57:44 UTC (rev 57387)
@@ -71,6 +71,7 @@
         wx.Window.__init__(self, parent = parent, id = id, style = style, **kwargs)
 
         self._properties = properties
+        self.frame = frame  # remove including a frame parameter
 
         # flags
         self.resize = False # indicates whether or not a resize event has taken place
@@ -782,6 +783,7 @@
             # draw region extent
             self.DrawLines(pdc=self.pdcDec, polycoords=regionCoords)
 
+    # TODO: move to utils
     def IsInRegion(self, region, refRegion):
         """!
         Test if 'region' is inside of 'refRegion'



More information about the grass-commit mailing list