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:
parent
a16c6fdcbd
commit
c0ab3f7fbb
@ -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()
|
||||
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user