Browse Source

wxGUI/mapwindow: tree parameter needed in vdigit (fixing https://trac.osgeo.org/grass/changeset/57244, reverting https://trac.osgeo.org/grass/changeset/57288)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57340 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 12 years ago
parent
commit
0f3912c4d8
1 changed files with 2 additions and 6 deletions
  1. 2 6
      gui/wxpython/vdigit/mapwindow.py

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

@@ -30,20 +30,16 @@ from gui_core       import gselect
 class VDigitWindow(BufferedWindow):
     """!A Buffered window extended for vector digitizer.
     """
-    def __init__(self, parent, giface, Map, frame,
+    def __init__(self, parent, giface, Map, frame, tree=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, style=style, **kwargs)
         self.lmgr = lmgr
+        self.tree = tree
         self.pdcVector = wx.PseudoDC()
         self.toolbar   = self.parent.GetToolbar('vdigit')
         self.digit     = None # wxvdigit.IVDigit
-        
-        if hasattr(giface, "GetLayerTree"):
-            self.tree = giface.GetLayerTree()
-        else:
-            self.tree = None
 
         self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)