[GRASS-SVN] r46524 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 2 18:11:28 EDT 2011


Author: martinl
Date: 2011-06-02 15:11:28 -0700 (Thu, 02 Jun 2011)
New Revision: 46524

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/preferences.py
Log:
wxGUI: fix preferences saving
      (merge r46522 from trunk)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/preferences.py	2011-06-02 22:09:27 UTC (rev 46523)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/preferences.py	2011-06-02 22:11:28 UTC (rev 46524)
@@ -745,9 +745,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