Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI/gmodeler: fix storing current model settings to model file #3188

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gui/wxpython/gmodeler/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def OnCloseWindow(self, event):
message = _("Do you want to save changes in the model?")
else:
message = _(
"Do you want to store current model settings " "to model file?"
"Do you want to store current model settings to model file?"
)

# ask user to save current settings
Expand All @@ -370,7 +370,7 @@ def OnCloseWindow(self, event):
ret = dlg.ShowModal()
if ret == wx.ID_YES:
if not self.modelFile:
self.OnWorkspaceSaveAs()
self.OnModelSaveAs()
else:
self.WriteModelFile(self.modelFile)
elif ret == wx.ID_CANCEL:
Expand Down Expand Up @@ -559,9 +559,9 @@ def OnModelSave(self, event=None):
self.SetStatusText(_("File <%s> saved") % self.modelFile, 0)
self.SetTitle(self.baseTitle + " - " + os.path.basename(self.modelFile))
elif not self.modelFile:
self.OnModelSaveAs(None)
self.OnModelSaveAs()

def OnModelSaveAs(self, event):
def OnModelSaveAs(self, event=None):
"""Create model to file as"""
filename = ""
dlg = wx.FileDialog(
Expand Down