[GRASS-SVN] r54037 - in grass/trunk/gui/wxpython: gui_core mapdisp mapswipe nviz vdigit
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Nov 25 14:10:44 PST 2012
Author: annakrat
Date: 2012-11-25 14:10:43 -0800 (Sun, 25 Nov 2012)
New Revision: 54037
Modified:
grass/trunk/gui/wxpython/gui_core/mapwindow.py
grass/trunk/gui/wxpython/mapdisp/mapwindow.py
grass/trunk/gui/wxpython/mapswipe/mapwindow.py
grass/trunk/gui/wxpython/nviz/mapwindow.py
grass/trunk/gui/wxpython/nviz/tools.py
grass/trunk/gui/wxpython/vdigit/mapwindow.py
Log:
wxGUI/mapwindow: remove unused constructor parameters
Modified: grass/trunk/gui/wxpython/gui_core/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/mapwindow.py 2012-11-25 18:26:59 UTC (rev 54036)
+++ grass/trunk/gui/wxpython/gui_core/mapwindow.py 2012-11-25 22:10:43 UTC (rev 54037)
@@ -36,13 +36,10 @@
- Pixel2Cell
- Cell2Pixel (if it is possible)
"""
- def __init__(self, parent, giface, Map, frame,
- tree = None, lmgr = None, **kwargs):
- self.parent = parent # MapFrame
- self.Map = Map
+ def __init__(self, parent, giface, Map, frame, **kwargs):
+ self.parent = parent
+ self.Map = Map
self.frame = frame
- self.tree = tree
- self.lmgr = lmgr
self._giface = giface
# mouse attributes -- position on the screen, begin and end of
Modified: grass/trunk/gui/wxpython/mapdisp/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/mapwindow.py 2012-11-25 18:26:59 UTC (rev 54036)
+++ grass/trunk/gui/wxpython/mapdisp/mapwindow.py 2012-11-25 22:10:43 UTC (rev 54037)
@@ -55,9 +55,10 @@
id = wx.ID_ANY, tree = None, lmgr = None,
style = wx.NO_FULL_REPAINT_ON_RESIZE, **kwargs):
MapWindow.__init__(self, parent = parent, giface = giface, Map = Map,
- frame = frame, tree = tree, lmgr = lmgr, **kwargs)
+ 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
Modified: grass/trunk/gui/wxpython/mapswipe/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/mapwindow.py 2012-11-25 18:26:59 UTC (rev 54036)
+++ grass/trunk/gui/wxpython/mapswipe/mapwindow.py 2012-11-25 22:10:43 UTC (rev 54037)
@@ -36,9 +36,9 @@
Special mouse events with changed coordinates are used.
"""
def __init__(self, parent, giface, Map, frame,
- tree = None, lmgr = None, **kwargs):
+ tree = None, **kwargs):
BufferedWindow.__init__(self, parent = parent, giface = giface,
- Map = Map, frame = frame, tree = tree, lmgr = lmgr, **kwargs)
+ Map = Map, frame = frame, tree = tree, **kwargs)
Debug.msg(2, "SwipeBufferedWindow.__init__()")
self.specialSize = super(SwipeBufferedWindow, self).GetClientSize()
Modified: grass/trunk/gui/wxpython/nviz/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/mapwindow.py 2012-11-25 18:26:59 UTC (rev 54036)
+++ grass/trunk/gui/wxpython/nviz/mapwindow.py 2012-11-25 22:10:43 UTC (rev 54037)
@@ -70,10 +70,12 @@
def __init__(self, parent, giface, id = wx.ID_ANY, frame = None,
Map = None, tree = None, lmgr = None):
self.parent = parent # MapFrame
-
+ self.tree = tree
+ self.lmgr = lmgr
+
glcanvas.GLCanvas.__init__(self, parent, id)
MapWindow.__init__(self, parent = parent, giface = giface, frame = frame,
- Map = Map, tree = tree, lmgr = lmgr)
+ Map = Map)
self.Hide()
self.init = False
Modified: grass/trunk/gui/wxpython/nviz/tools.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/tools.py 2012-11-25 18:26:59 UTC (rev 54036)
+++ grass/trunk/gui/wxpython/nviz/tools.py 2012-11-25 22:10:43 UTC (rev 54037)
@@ -2057,6 +2057,8 @@
"""
tree = self.parent.GetLayerTree()
items = tree.FindItemByData(key = 'name', value = name)
+ if not items:
+ return None
for item in items:
if tree.GetLayerInfo(item, key = 'type') == mapType:
return tree.GetLayerInfo(item, key = 'nviz')
Modified: grass/trunk/gui/wxpython/vdigit/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/mapwindow.py 2012-11-25 18:26:59 UTC (rev 54036)
+++ grass/trunk/gui/wxpython/vdigit/mapwindow.py 2012-11-25 22:10:43 UTC (rev 54037)
@@ -32,8 +32,8 @@
id = wx.ID_ANY, tree = None, 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, lmgr = lmgr, style = style, **kwargs)
-
+ frame = frame, tree = tree, style = style, **kwargs)
+ self.lmgr = lmgr
self.pdcVector = wx.PseudoDC()
self.toolbar = self.parent.GetToolbar('vdigit')
self.digit = None # wxvdigit.IVDigit
More information about the grass-commit
mailing list