[GRASS-SVN] r44153 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Nov 1 14:53:48 EDT 2010


Author: martinl
Date: 2010-11-01 11:53:48 -0700 (Mon, 01 Nov 2010)
New Revision: 44153

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/colorrules.py
Log:
wxGUI/colorrules: fix preview
(merge r44151 from trunk)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/colorrules.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/colorrules.py	2010-11-01 18:52:34 UTC (rev 44152)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/colorrules.py	2010-11-01 18:53:48 UTC (rev 44153)
@@ -586,9 +586,16 @@
             # find existing color table and copy to temp file
             try:
                 name, mapset = self.inmap.split('@')
+            except ValueError:
+                name = self.inmap
+                mapset = grass.find_file(self.inmap, element = 'cell')['mapset']
+                if not mapset:
+                    return
+            old_colrtable = None
+            if mapset == grass.gisenv()['MAPSET']:
+                old_colrtable = grass.find_file(name=name, element='colr')['file']
+            else:
                 old_colrtable = grass.find_file(name=name, element='colr2/' + mapset)['file']
-            except (TypeError, ValueError):
-                old_colrtable = None
             
             if old_colrtable:
                 colrtemp = utils.GetTempfile()



More information about the grass-commit mailing list