X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=Cura%2Fgui%2FmainWindow.py;h=590252a53d3bc4adfbe1d1751e5894bcd36ce187;hb=6208201bafdeaf82883181471c6da3a41283cfe7;hp=7efb631dce2ce73df98b788b3a9ff4c366071e8a;hpb=55c8340dc0bb9ab535876c85f9452e2e49019163;p=cura.git diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index 7efb631d..590252a5 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -122,6 +122,17 @@ class mainWindow(wx.Frame): i = toolsMenu.Append(-1, _("Copy profile to clipboard")) self.Bind(wx.EVT_MENU, self.onCopyProfileClipboard,i) + + toolsMenu.AppendSeparator() + self.allAtOnceItem = toolsMenu.Append(-1, _("Print all at once"), kind=wx.ITEM_RADIO) + self.Bind(wx.EVT_MENU, self.onOneAtATimeSwitch, self.allAtOnceItem) + self.oneAtATime = toolsMenu.Append(-1, _("Print one at a time"), kind=wx.ITEM_RADIO) + self.Bind(wx.EVT_MENU, self.onOneAtATimeSwitch, self.oneAtATime) + if profile.getPreference('oneAtATime') == 'True': + self.oneAtATime.Check(True) + else: + self.allAtOnceItem.Check(True) + self.menubar.Append(toolsMenu, _("Tools")) #Machine menu for machine configuration/tooling @@ -245,6 +256,7 @@ class mainWindow(wx.Frame): self.Centre() self.updateSliceMode() + self.scene.SetFocus() def onTimer(self, e): #Check if there is something in the clipboard @@ -310,6 +322,13 @@ class mainWindow(wx.Frame): self.headOffsetWizardMenuItem.Enable(False) self.scene.updateProfileToControls() + def onOneAtATimeSwitch(self, e): + profile.putPreference('oneAtATime', self.oneAtATime.IsChecked()) + if self.oneAtATime.IsChecked() and profile.getMachineSettingFloat('extruder_head_size_height') < 1: + wx.MessageBox(_('For "One at a time" printing, you need to have entered the correct head size and gantry height in the machine settings'), _('One at a time warning'), wx.OK | wx.ICON_WARNING) + self.scene.updateProfileToControls() + self.scene.sceneUpdated() + def OnPreferences(self, e): prefDialog = preferencesDialog.preferencesDialog(self) prefDialog.Centre() @@ -556,7 +575,7 @@ class mainWindow(wx.Frame): #HACK: Set the paint function of the glCanvas to nothing so it won't keep refreshing. Which can keep wxWidgets from quiting. print "Closing down" self.scene.OnPaint = lambda e : e - self.scene._slicer.cleanup() + self.scene._engine.cleanup() self.Destroy() def OnQuit(self, e):