[GRASS-SVN] r54973 - in grass/trunk/gui/wxpython: lmgr mapdisp
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Feb 7 07:31:25 PST 2013
Author: wenzeslaus
Date: 2013-02-07 07:31:25 -0800 (Thu, 07 Feb 2013)
New Revision: 54973
Modified:
grass/trunk/gui/wxpython/lmgr/frame.py
grass/trunk/gui/wxpython/lmgr/layertree.py
grass/trunk/gui/wxpython/lmgr/menudata.py
grass/trunk/gui/wxpython/mapdisp/main.py
grass/trunk/gui/wxpython/mapdisp/overlays.py
grass/trunk/gui/wxpython/mapdisp/statusbar.py
Log:
wxGUI: small code cleanup
Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py 2013-02-07 15:09:56 UTC (rev 54972)
+++ grass/trunk/gui/wxpython/lmgr/frame.py 2013-02-07 15:31:25 UTC (rev 54973)
@@ -1072,7 +1072,7 @@
@return False on error
"""
# dtd
- dtdFilename = os.path.join(globalvar.ETCWXDIR, "xml", "grass-gxw.dtd")
+ # dtdFilename = os.path.join(globalvar.ETCWXDIR, "xml", "grass-gxw.dtd")
# parse workspace file
try:
@@ -1437,17 +1437,7 @@
win.Show()
win.Refresh()
win.Update()
-
- def OnProfile(self, event):
- """!Launch profile tool
- """
- win = profile.ProfileFrame(parent = self)
-
- win.CentreOnParent()
- win.Show()
- win.Refresh()
- win.Update()
-
+
def OnMapCalculator(self, event, cmd = ''):
"""!Init map calculator for interactive creation of mapcalc statements
"""
Modified: grass/trunk/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/layertree.py 2013-02-07 15:09:56 UTC (rev 54972)
+++ grass/trunk/gui/wxpython/lmgr/layertree.py 2013-02-07 15:31:25 UTC (rev 54973)
@@ -265,8 +265,10 @@
def GetSelectedLayers(self, checkedOnly = False):
"""!Get selected layers as a list.
+
+ @todo somewhere we have checkedOnly default True and elsewhere False
"""
- return self.GetSelectedLayer(multi = True, checkedOnly = False)
+ return self.GetSelectedLayer(multi = True, checkedOnly = checkedOnly)
def GetSelectedLayer(self, multi = False, checkedOnly = False):
"""!Get selected layer from layer tree.
Modified: grass/trunk/gui/wxpython/lmgr/menudata.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/menudata.py 2013-02-07 15:09:56 UTC (rev 54972)
+++ grass/trunk/gui/wxpython/lmgr/menudata.py 2013-02-07 15:31:25 UTC (rev 54973)
@@ -24,7 +24,6 @@
class LayerManagerMenuData(MenuData):
def __init__(self, filename = None):
if not filename:
- gisbase = os.getenv('GISBASE')
global etcwxdir
filename = os.path.join(ETCWXDIR, 'xml', 'menudata.xml')
Modified: grass/trunk/gui/wxpython/mapdisp/main.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/main.py 2013-02-07 15:09:56 UTC (rev 54972)
+++ grass/trunk/gui/wxpython/mapdisp/main.py 2013-02-07 15:31:25 UTC (rev 54973)
@@ -50,7 +50,7 @@
class DMonMap(Map):
- def __init__(self, gisrc = None, cmdfile = None, mapfile = None, envfile = None, monitor = None):
+ def __init__(self, cmdfile=None, mapfile=None, envfile=None, monitor=None):
"""!Map composition (stack of map layers and overlays)
@param cmdline full path to the cmd file (defined by d.mon)
@@ -282,6 +282,7 @@
class DMonGrassInterface(StandaloneGrassInterface):
+ """!@implements GrassInterface"""
def __init__(self, mapframe):
StandaloneGrassInterface.__init__(self)
self._mapframe = mapframe
Modified: grass/trunk/gui/wxpython/mapdisp/overlays.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/overlays.py 2013-02-07 15:09:56 UTC (rev 54972)
+++ grass/trunk/gui/wxpython/mapdisp/overlays.py 2013-02-07 15:31:25 UTC (rev 54973)
@@ -25,6 +25,9 @@
self._pdcType = 'image'
self._propwin = None
self._defaultAt = ''
+ self._cmd = None # to be set by user
+ self._name = None # to be defined by subclass
+ self._id = None # to be defined by subclass
def SetCmd(self, cmd):
hasAt = False
@@ -92,7 +95,6 @@
else:
self.Hide()
-
def Hide(self):
if self._overlay:
self._overlay.SetActive(False)
Modified: grass/trunk/gui/wxpython/mapdisp/statusbar.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/statusbar.py 2013-02-07 15:09:56 UTC (rev 54972)
+++ grass/trunk/gui/wxpython/mapdisp/statusbar.py 2013-02-07 15:31:25 UTC (rev 54973)
@@ -439,8 +439,9 @@
for mapWindow in self.mapFrame.GetWindows():
mapWindow.regionCoords = []
elif hasattr(self.mapFrame.GetWindow(), 'regionCoords'):
+ # TODO: this maybe never happends
for mapWindow in self.mapFrame.GetWindows():
- mapWindow.regionCoords
+ mapWindow.regionCoords = []
class SbAlignExtent(SbItem):
"""!Checkbox to select zoom behavior.
More information about the grass-commit
mailing list