[GRASS-SVN] r52721 - grass/trunk/gui/wxpython/core

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 18 02:12:57 PDT 2012


Author: martinl
Date: 2012-08-18 02:12:56 -0700 (Sat, 18 Aug 2012)
New Revision: 52721

Modified:
   grass/trunk/gui/wxpython/core/settings.py
Log:
wxGUI/settings: fix r52719 - check also subkey


Modified: grass/trunk/gui/wxpython/core/settings.py
===================================================================
--- grass/trunk/gui/wxpython/core/settings.py	2012-08-17 21:26:11 UTC (rev 52720)
+++ grass/trunk/gui/wxpython/core/settings.py	2012-08-18 09:12:56 UTC (rev 52721)
@@ -1093,6 +1093,7 @@
         @param value value
         @param overwrite True to overwrite existing value
         """
+
         hasValue = True
         if group not in dict:
             dict[group] = {}
@@ -1107,6 +1108,8 @@
             if subkey[0] not in dict[group][key]:
                 dict[group][key][subkey[0]] = {}
                 hasValue = False
+            if subkey[1] not in dict[group][key][subkey[0]]:
+                hasValue = False
             
             try:
                 if overwrite or (not overwrite and not hasValue):
@@ -1115,6 +1118,9 @@
                 print >> sys.stderr, _("Unable to parse settings '%s'") % value + \
                     ' (' + group + ':' + key + ':' + subkey[0] + ':' + subkey[1] + ')'
         else:
+            if subkey not in dict[group][key]:
+                hasValue = False
+            
             try:
                 if overwrite or (not overwrite and not hasValue):
                     dict[group][key][subkey] = value



More information about the grass-commit mailing list