Allow Save Settings to save even when AutoSave is turned off

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2006-02-03 23:07:15 +00:00
parent a16c6fdcbd
commit c0ab3f7fbb
2 changed files with 6 additions and 6 deletions

View File

@ -291,17 +291,17 @@ class CrustFrame(frame.Frame, frame.ShellFrameMixin):
self.crust.LoadSettings(self.config)
def SaveSettings(self):
def SaveSettings(self, force=False):
if self.config is not None:
frame.ShellFrameMixin.SaveSettings(self)
if self.autoSaveSettings:
if self.autoSaveSettings or force:
frame.Frame.SaveSettings(self, self.config)
self.crust.SaveSettings(self.config)
def DoSaveSettings(self):
if self.config is not None:
self.SaveSettings()
self.SaveSettings(force=True)
self.config.Flush()

View File

@ -106,16 +106,16 @@ class ShellFrame(frame.Frame, frame.ShellFrameMixin):
frame.Frame.LoadSettings(self, self.config)
self.shell.LoadSettings(self.config)
def SaveSettings(self):
def SaveSettings(self, force=False):
if self.config is not None:
frame.ShellFrameMixin.SaveSettings(self)
if self.autoSaveSettings:
if self.autoSaveSettings or force:
frame.Frame.SaveSettings(self, self.config)
self.shell.SaveSettings(self.config)
def DoSaveSettings(self):
if self.config is not None:
self.SaveSettings()
self.SaveSettings(force=True)
self.config.Flush()