[GRASS-SVN] r62609 - in grass/trunk/gui/wxpython: lmgr mapdisp
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 4 21:07:43 PST 2014
Author: annakrat
Date: 2014-11-04 21:07:43 -0800 (Tue, 04 Nov 2014)
New Revision: 62609
Modified:
grass/trunk/gui/wxpython/lmgr/frame.py
grass/trunk/gui/wxpython/lmgr/layertree.py
grass/trunk/gui/wxpython/mapdisp/frame.py
Log:
wxGUI: fix renaming map displays
Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py 2014-11-05 03:53:15 UTC (rev 62608)
+++ grass/trunk/gui/wxpython/lmgr/frame.py 2014-11-05 05:07:43 UTC (rev 62609)
@@ -964,7 +964,7 @@
dispId = 1
for display in self.GetMapDisplay(onlyCurrent = False):
- display.SetTitle(dispId) # TODO: signal ?
+ display.SetTitleNumber(dispId) # TODO: signal ?
dispId += 1
def OnChangeCWD(self, event=None, cmd=None):
@@ -1481,10 +1481,9 @@
name = dlg.GetValue()
self.notebookLayers.SetPageText(page = self.currentPageNum, text = name)
mapdisplay = self.GetMapDisplay()
- mapdisplay.SetTitle(_("GRASS GIS %(version) Map Display: %(name)s - Location: %(loc)s") % \
- { 'version' : grass.version()['version'],
- 'name' : name,
- 'loc' : grass.gisenv()["LOCATION_NAME"] })
+ mapdisplay.SetTitle(_("GRASS GIS {version} Map Display: {name} - Location: {loc}").format(
+ version=grass.version()['version'], name=name,
+ loc=grass.gisenv()["LOCATION_NAME"]))
dlg.Destroy()
def OnRasterRules(self, event):
Modified: grass/trunk/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/layertree.py 2014-11-05 03:53:15 UTC (rev 62608)
+++ grass/trunk/gui/wxpython/lmgr/layertree.py 2014-11-05 05:07:43 UTC (rev 62609)
@@ -175,7 +175,7 @@
lmgr = self.lmgr, page = self.treepg,
Map = self.Map)
- self.mapdisplay.SetTitle(self.displayIndex + 1)
+ self.mapdisplay.SetTitleNumber(self.displayIndex + 1)
# show new display
if showMapDisplay is True:
Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py 2014-11-05 03:53:15 UTC (rev 62608)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py 2014-11-05 05:07:43 UTC (rev 62609)
@@ -240,7 +240,7 @@
def GetMapWindow(self):
return self.MapWindow
- def SetTitle(self, displayId = 1):
+ def SetTitleNumber(self, displayId=1):
"""Set map display title"""
try:
grassVersion = grass.version()['version']
@@ -255,7 +255,7 @@
'loc': gisenv["LOCATION_NAME"],
'mapset': gisenv["MAPSET"]}
- super(MapFrame, self).SetTitle(title)
+ self.SetTitle(title)
def _addToolbarVDigit(self):
"""Add vector digitizer toolbar
More information about the grass-commit
mailing list