瀏覽代碼

wxGUI/mapwindow: frame parameter added to the BufferedWindow (fixing https://trac.osgeo.org/grass/changeset/57385), todos added

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57387 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 11 年之前
父節點
當前提交
971901d8c0
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 4 1
      gui/wxpython/mapdisp/frame.py
  2. 2 0
      gui/wxpython/mapdisp/mapwindow.py

+ 4 - 1
gui/wxpython/mapdisp/frame.py

@@ -559,7 +559,8 @@ class MapFrame(SingleMapFrame):
         # 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 @@ class MapFrame(SingleMapFrame):
         self.UpdateMap()
         # event.Skip()
 
+    # TODO: delete this here and in gcp
     def OnAlignRegion(self, event):
         """!Align region
         """
@@ -979,6 +981,7 @@ class MapFrame(SingleMapFrame):
         # 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

+ 2 - 0
gui/wxpython/mapdisp/mapwindow.py

@@ -71,6 +71,7 @@ class BufferedWindow(MapWindow, wx.Window):
         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 @@ class BufferedWindow(MapWindow, wx.Window):
             # 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'