def OnRemoveMachine(self, e): if profile.getMachineCount() < 2: wx.MessageBox(_("Cannot remove the last machine configuration in Cura"), _("Machine remove error"), wx.OK | wx.ICON_ERROR) return self.Hide() profile.removeMachine(self.nb.GetSelection()) self.parent.reloadSettingPanels() self.parent.updateMachineMenu() prefDialog = machineSettingsDialog(self.parent) prefDialog.Centre() prefDialog.Show() wx.CallAfter(self.Close)
def OnRemoveMachine(self, e): if profile.getMachineCount() < 2: wx.MessageBox(_("Cannot remove the last machine configuration in Cura"), _("Machine remove error"), wx.OK | wx.ICON_ERROR) return dlg = wx.MessageDialog(self, _("Are you sure you want to remove the selected machine?"), _('Remove machine?'), wx.YES_NO | wx.ICON_EXCLAMATION) remove = dlg.ShowModal() == wx.ID_YES dlg.Destroy() if remove: self.Hide() profile.removeMachine(self.nb.GetSelection()) self.parent.reloadSettingPanels() self.parent.updateMachineMenu() prefDialog = machineSettingsDialog(self.parent) prefDialog.Centre() prefDialog.Show() wx.CallAfter(self.Close)
def OnRemoveMachine(self, e): if profile.getMachineCount() < 2: wx.MessageBox( _("Cannot remove the last machine configuration in Cura"), _("Machine remove error"), wx.OK | wx.ICON_ERROR) return dlg = wx.MessageDialog( self, _("Are you sure you want to remove the selected machine?"), _('Remove machine?'), wx.YES_NO | wx.ICON_EXCLAMATION) remove = dlg.ShowModal() == wx.ID_YES dlg.Destroy() if remove: self.Hide() profile.removeMachine(self.nb.GetSelection()) self.parent.reloadSettingPanels() self.parent.updateMachineMenu() prefDialog = machineSettingsDialog(self.parent) prefDialog.Centre() prefDialog.Show() wx.CallAfter(self.Close)