Pārlūkot izejas kodu

wxGUI: fix find colr2 element
(merge from devbr6, https://trac.osgeo.org/grass/changeset/33800)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33801 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 gadi atpakaļ
vecāks
revīzija
a1bc205142
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3 2
      gui/wxpython/gui_modules/colorrules.py

+ 3 - 2
gui/wxpython/gui_modules/colorrules.py

@@ -515,8 +515,9 @@ class ColorTable(wx.Frame):
             
             # find existing color table and copy to temp file
             try:
-                old_colrtable = grass.find_file(name=self.inmap, element='colr2')['file']
-            except TypeError:
+                name, mapset = self.inmap.split('@')
+                old_colrtable = grass.find_file(name=name, element='colr2/' + mapset)['file']
+            except (TypeError, ValueError):
                 old_colrtable = None
             
             if old_colrtable: