[GRASS-SVN] r57340 - grass/trunk/gui/wxpython/vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 1 07:35:31 PDT 2013


Author: wenzeslaus
Date: 2013-08-01 07:35:31 -0700 (Thu, 01 Aug 2013)
New Revision: 57340

Modified:
   grass/trunk/gui/wxpython/vdigit/mapwindow.py
Log:
wxGUI/mapwindow: tree parameter needed in vdigit (fixing r57244, reverting r57288)

Modified: grass/trunk/gui/wxpython/vdigit/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/mapwindow.py	2013-08-01 14:27:34 UTC (rev 57339)
+++ grass/trunk/gui/wxpython/vdigit/mapwindow.py	2013-08-01 14:35:31 UTC (rev 57340)
@@ -30,20 +30,16 @@
 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)
         



More information about the grass-commit mailing list