chiark / gitweb /
Merge branch 'master' into SteamEngine
authordaid303 <daid303@gmail.com>
Mon, 22 Apr 2013 12:55:30 +0000 (14:55 +0200)
committerdaid303 <daid303@gmail.com>
Mon, 22 Apr 2013 12:55:30 +0000 (14:55 +0200)
Conflicts:
package.sh

Cura/gui/mainWindow.py
Cura/gui/preferencesDialog.py

index 91adfa299040a53b9eefc2102a2c2bc3848e385d..bd78aa4ac0b77bed77c2cfab6694f6350d2513e0 100644 (file)
@@ -255,7 +255,7 @@ class mainWindow(wx.Frame):
        def OnPreferences(self, e):
                prefDialog = preferencesDialog.preferencesDialog(self)
                prefDialog.Centre()
-               prefDialog.Show(True)
+               prefDialog.Show()
 
        def OnDropFiles(self, files):
                profile.setPluginConfig([])
index f1e922463b868228b2888100b130f44793891528..e2940e4c522d81375e656c83ee41ba96bdf45d41 100644 (file)
@@ -7,9 +7,9 @@ from Cura.util import removableStorage
 from Cura.util import machineCom
 from Cura.util import profile
 
-class preferencesDialog(wx.Frame):
+class preferencesDialog(wx.Dialog):
        def __init__(self, parent):
-               super(preferencesDialog, self).__init__(None, title="Preferences", style=wx.DEFAULT_DIALOG_STYLE)
+               super(preferencesDialog, self).__init__(None, title="Preferences")
                
                wx.EVT_CLOSE(self, self.OnClose)
                
@@ -58,15 +58,13 @@ class preferencesDialog(wx.Frame):
 
                self.okButton = wx.Button(right, -1, 'Ok')
                right.GetSizer().Add(self.okButton, (right.GetSizer().GetRows(), 0), flag=wx.BOTTOM, border=5)
-               self.okButton.Bind(wx.EVT_BUTTON, self.OnClose)
+               self.okButton.Bind(wx.EVT_BUTTON, lambda e: self.Close())
                
-               self.MakeModal(True)
                main.Fit()
                self.Fit()
 
        def OnClose(self, e):
                if self.oldExtruderAmount != int(profile.getPreference('extruder_amount')):
                        wx.MessageBox('After changing the amount of extruders you need to restart Cura for full effect.', 'Extruder amount warning.', wx.OK | wx.ICON_INFORMATION)
-               self.MakeModal(False)
                self.parent.updateProfileToControls()
                self.Destroy()