[GRASS-SVN] r44152 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Nov 1 14:52:34 EDT 2010


Author: martinl
Date: 2010-11-01 11:52:34 -0700 (Mon, 01 Nov 2010)
New Revision: 44152

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


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