[GRASS-SVN] r44151 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Nov 1 14:26:30 EDT 2010


Author: martinl
Date: 2010-11-01 11:26:30 -0700 (Mon, 01 Nov 2010)
New Revision: 44151

Modified:
   grass/trunk/gui/wxpython/gui_modules/colorrules.py
Log:
wxGUI/colorrules: fix preview


Modified: grass/trunk/gui/wxpython/gui_modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/colorrules.py	2010-11-01 11:34:15 UTC (rev 44150)
+++ grass/trunk/gui/wxpython/gui_modules/colorrules.py	2010-11-01 18:26:30 UTC (rev 44151)
@@ -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