Преглед изворни кода

wxGUI/mapwindow: removing unused tree variables from BufferedWindow

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57244 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras пре 11 година
родитељ
комит
ec23d47386

+ 2 - 2
gui/wxpython/mapdisp/frame.py

@@ -148,8 +148,8 @@ class MapFrame(SingleMapFrame):
         # Init map display (buffered DC & set default cursor)
         #
         self.MapWindow2D = BufferedWindow(self, giface = self._giface, id = wx.ID_ANY,
-                                          Map = self.Map, frame = self, tree = self.tree,
-                                          lmgr = self._layerManager, overlays = self.decorations)
+                                          Map=self.Map, frame=self,
+                                          overlays=self.decorations)
         self.MapWindow2D.mapQueried.connect(self.Query)
         # enable or disable zoom history tool
         self.MapWindow2D.zoomHistoryAvailable.connect(

+ 11 - 3
gui/wxpython/mapdisp/mapwindow.py

@@ -56,13 +56,21 @@ class BufferedWindow(MapWindow, wx.Window):
     SaveToFile() method.
     """
     def __init__(self, parent, giface, Map, frame,
-                 id = wx.ID_ANY, tree = None, lmgr = None, overlays = None,
+                 id=wx.ID_ANY, overlays=None,
                  style = wx.NO_FULL_REPAINT_ON_RESIZE, **kwargs):
+        """!
+        @param parent parent window
+        @param giface grass interface instance
+        @param Map map instance
+        @param frame map frame instance (to be removed)
+        @param id wx window id
+        @param style wx window style
+        @param kwargs keyword arguments passed to MapWindow and wx.Window
+        """
         MapWindow.__init__(self, parent = parent, giface = giface, Map = Map,
                            frame = frame, **kwargs)
         wx.Window.__init__(self, parent = parent, id = id, style = style, **kwargs)
-        
-        self.tree = tree
+
         # flags
         self.resize = False # indicates whether or not a resize event has taken place
         self.dragimg = None # initialize variable for map panning

+ 2 - 3
gui/wxpython/mapswipe/mapwindow.py

@@ -36,10 +36,9 @@ class SwipeBufferedWindow(BufferedWindow):
     Enables to draw the image translated.
     Special mouse events with changed coordinates are used.
     """
-    def __init__(self, parent, giface, Map, frame,
-                 tree = None, **kwargs):
+    def __init__(self, parent, giface, Map, frame, **kwargs):
         BufferedWindow.__init__(self, parent = parent, giface = giface,
-                                Map = Map, frame = frame, tree = tree, **kwargs)
+                                Map=Map, frame=frame, **kwargs)
         Debug.msg(2, "SwipeBufferedWindow.__init__()")
 
         self.specialSize = super(SwipeBufferedWindow, self).GetClientSize()

+ 2 - 2
gui/wxpython/vdigit/mapwindow.py

@@ -31,10 +31,10 @@ class VDigitWindow(BufferedWindow):
     """!A Buffered window extended for vector digitizer.
     """
     def __init__(self, parent, giface, Map, frame,
-                 id = wx.ID_ANY, tree = None, lmgr = None,
+                 id=wx.ID_ANY, lmgr=None,
                  style = wx.NO_FULL_REPAINT_ON_RESIZE, **kwargs):
         BufferedWindow.__init__(self, parent = parent, giface = giface, id = id, Map = Map,
-                                frame = frame, tree = tree, style = style, **kwargs)
+                                frame=frame, style=style, **kwargs)
         self.lmgr = lmgr
         self.pdcVector = wx.PseudoDC()
         self.toolbar   = self.parent.GetToolbar('vdigit')