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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 2 18:03:20 EDT 2011


Author: martinl
Date: 2011-06-02 15:03:20 -0700 (Thu, 02 Jun 2011)
New Revision: 46522

Modified:
   grass/trunk/gui/wxpython/gui_modules/preferences.py
Log:
wxGUI: fix preferences saving


Modified: grass/trunk/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/preferences.py	2011-06-02 19:21:06 UTC (rev 46521)
+++ grass/trunk/gui/wxpython/gui_modules/preferences.py	2011-06-02 22:03:20 UTC (rev 46522)
@@ -765,9 +765,10 @@
                                                        svalue))
                                 if sidx < len(kvalues) - 1:
                                     file.write('%s' % self.sep)
-#                            if len(subkeys) > 4 and idx < len(subkeys) - 1:
-#                                file.write('%s%s%s%s%s' % (os.linesep, group, self.sep, key, self.sep))
                         else:
+                            if idx > 0 and \
+                                    type(settings[group][key][subkeys[idx - 1]]) == types.DictType:
+                                file.write('%s%s%s%s%s' % (os.linesep, group, self.sep, key, self.sep))
                             value = self._parseValue(settings[group][key][subkeys[idx]])
                             file.write('%s%s%s' % (subkeys[idx], self.sep, value))
                             if idx < len(subkeys) - 1 and \



More information about the grass-commit mailing list