Przeglądaj źródła

Added current file extension check

Gyedo Jeon 15 lat temu
rodzic
commit
3de2269641
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      direct/src/leveleditor/LevelEditorUIBase.py

+ 2 - 1
direct/src/leveleditor/LevelEditorUIBase.py

@@ -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()