Added current file extension check

This commit is contained in:
Gyedo Jeon 2010-03-25 03:31:33 +00:00
parent be7a26dd12
commit 3de2269641

View File

@ -379,7 +379,8 @@ class LevelEditorUIBase(WxAppShell):
dialog.Destroy()
def onSave(self, evt=None):
if self.editor.currentFile is None:
if self.editor.currentFile is None or\
not self.editor.currentFile.endswith('.py'):
return self.onSaveAs(evt)
else:
self.editor.save()