[GRASS-SVN] r49817 - grass/trunk/gui/wxpython/iclass
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Dec 18 15:04:55 EST 2011
Author: annakrat
Date: 2011-12-18 12:04:55 -0800 (Sun, 18 Dec 2011)
New Revision: 49817
Modified:
grass/trunk/gui/wxpython/iclass/frame.py
Log:
wxIClass: fix updating class name
Modified: grass/trunk/gui/wxpython/iclass/frame.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/frame.py 2011-12-18 19:39:50 UTC (rev 49816)
+++ grass/trunk/gui/wxpython/iclass/frame.py 2011-12-18 20:04:55 UTC (rev 49817)
@@ -528,7 +528,8 @@
self.statisticsDict[stats.category] = stats
#self.ConvertToNull(name = stats.rasterName)
- self.previewMapManager.AddLayer(name = stats.rasterName, resultsLayer = True)
+ self.previewMapManager.AddLayer(name = stats.rasterName,
+ alias = stats.name, resultsLayer = True)
# write statistics
I_iclass_add_signature(self.signatures, statistics)
else:
@@ -692,7 +693,7 @@
def SetToolbar(self, toolbar):
self.toolbar = toolbar
- def AddLayer(self, name, resultsLayer = False):
+ def AddLayer(self, name, alias = None, resultsLayer = False):
"""!Adds layer to Map and update toolbar
@param name layer (raster) name
@@ -708,8 +709,8 @@
name = name, l_hidden = False, l_opacity = 1.0, l_render = True)
self.frame.Render(self.mapWindow)
- if resultsLayer:
- alias = self._addSuffix(name.rsplit("_", 1)[0])
+ if alias is not None:
+ alias = self._addSuffix(alias)
self.layerName[alias] = name
name = alias
else:
More information about the grass-commit
mailing list