Changed default filename to empty string

When trying to save a new file it opens the save-as dialog
This commit is contained in:
Christophe Kamphaus 2016-02-28 23:24:20 +01:00
parent b386274738
commit 53de782d3c

View File

@ -60,7 +60,7 @@ class MainWindow(wx.Frame):
MainInitOnce()
self.filename = 'noname.spdl'
self.filename = ''
self.filepath = ""
self.load = False
@ -268,6 +268,9 @@ class MainWindow(wx.Frame):
return False
def OnSave(self, event):
if self.filename=='':
return self.OnSaveAs(event)
else:
textfile = open(os.path.join(self.dirname, self.filename), 'w')
textfile.write(self.editor.GetText())
textfile.close()