chiark / gitweb /
Minor cleanup.
authordaid <daid303@gmail.com>
Tue, 27 May 2014 07:55:44 +0000 (09:55 +0200)
committerdaid <daid303@gmail.com>
Tue, 27 May 2014 07:55:44 +0000 (09:55 +0200)
Cura/gui/mainWindow.py

index db46a4d385e9d4c632b34b92c08d8af7520236cf..90b2832ab5e79889d6c0a55a7ddf9d57b9a62340 100644 (file)
@@ -479,7 +479,7 @@ class mainWindow(wx.Frame):
                dlg.SetWildcard("ini files (*.ini)|*.ini")
                if dlg.ShowModal() == wx.ID_OK:
                        profileFile = dlg.GetPath()
-                       if platform.system() == 'Linux': #hack for linux, as for some reason the .ini is not appended.
+                       if not profileFile.lower().endswith('.ini'): #hack for linux, as for some reason the .ini is not appended.
                                profileFile += '.ini'
                        profile.saveProfile(profileFile)
                dlg.Destroy()
@@ -510,6 +510,7 @@ class mainWindow(wx.Frame):
                dlg.SetWildcard("HEX file (*.hex)|*.hex;*.HEX")
                if dlg.ShowModal() == wx.ID_OK:
                        filename = dlg.GetPath()
+                       dlg.Destroy()
                        if not(os.path.exists(filename)):
                                return
                        #For some reason my Ubuntu 10.10 crashes here.