From e932ad955815f184da5e329a10d28cf48eb61660 Mon Sep 17 00:00:00 2001 From: Tomas Zigo <50632337+tmszi@users.noreply.github.com> Date: Tue, 26 Sep 2023 13:38:47 +0200 Subject: [PATCH] wxGUI/gmodeler: fix storing current model settings to model file (#3188) If the Graphical Modeler window is closed. --- gui/wxpython/gmodeler/frame.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/wxpython/gmodeler/frame.py b/gui/wxpython/gmodeler/frame.py index e7ec49eba3d..c6e46c2a1af 100644 --- a/gui/wxpython/gmodeler/frame.py +++ b/gui/wxpython/gmodeler/frame.py @@ -340,7 +340,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 @@ -357,7 +357,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: @@ -546,9 +546,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(