From: <md...@ya...> - 2005-11-16 05:31:53
|
I was working on some other stuff and stumbled upon this. Basically, as it is now, the settings window does not save any setting that's currently in edit mode when you click "OK" and it leaves cells in edit mode when you switch tabs. The change I have here fixes that behavior. I know that we're under a code freeze at the moment, but this is a pretty common annoyance/bug that people encounter and the fix is mostly straightforward. With the paucity of releases, I figure it's better to get this in now rather than wait a year for it to go public. Thoughts? --mDuo13 Index: orpg/tools/orpg_settings.py =================================================================== RCS file: /cvsroot/openrpg/openrpg1/orpg/tools/orpg_settings.py,v retrieving revision 1.35 diff -u -r1.35 orpg_settings.py --- orpg/tools/orpg_settings.py 5 Nov 2005 04:43:30 -0000 1.35 +++ orpg/tools/orpg_settings.py 16 Nov 2005 05:21:29 -0000 @@ -242,6 +242,9 @@ def on_page_change(self,evt): + p = self.settings_tabs.GetPage(evt.GetOldSelection()) + p.SaveEditControlValue() + p.HideCellEditControl() if wxPlatform == '__WXMSW__': tmp = evt.GetSelection() if tmp == 0: @@ -271,6 +274,9 @@ def on_ok(self,evt): + #tablist = [self.settings_tabs.GetPage(t) for t in range(0,self.settings_tabs.GetPageCount())] + for t in range(0,self.settings_tabs.GetPageCount()) + self.settings_tabs.GetPage(t).SaveEditControlValue() for m in self.general_tab.setting_data: self.setobj.set_setting(m[0],m[1]) for m in self.chat_tab.setting_data: ------------------------------------------------------------- This message has been scanned by Postini anti-virus software. |