def OnResetProfile(self, e): dlg = wx.MessageDialog(self, 'This will reset all profile settings to defaults.\nUnless you have saved your current profile, all settings will be lost!\nDo you really want to reset?', 'Profile reset', wx.YES_NO | wx.ICON_QUESTION) result = dlg.ShowModal() == wx.ID_YES dlg.Destroy() if result: profile.resetGlobalProfile() self.updateProfileToControls()
def OnResetProfile(self, e): dlg = wx.MessageDialog( self, 'This will reset all profile settings to defaults.\nUnless you have saved your current profile, all settings will be lost!\nDo you really want to reset?', 'Profile reset', wx.YES_NO | wx.ICON_QUESTION) result = dlg.ShowModal() == wx.ID_YES dlg.Destroy() if result: profile.resetGlobalProfile() self.updateProfileToControls()
def OnResetProfile(self, e): dlg = wx.MessageDialog(self, 'This will reset all profile settings to defaults.\nUnless you have saved your current profile, all settings will be lost!\nDo you really want to reset?', 'Profile reset', wx.YES_NO | wx.ICON_QUESTION) result = dlg.ShowModal() == wx.ID_YES dlg.Destroy() if result: profile.resetGlobalProfile() if profile.getPreference('machine_type') == 'reprap': profile.putProfileSetting('nozzle_size', '0.5') profile.putProfileSetting('machine_center_x', '40') profile.putProfileSetting('machine_center_y', '40') self.updateProfileToControls()
def OnResetProfile(self, e): dlg = wx.MessageDialog( self, 'This will reset all profile settings to defaults.\nUnless you have saved your current profile, all settings will be lost!\nDo you really want to reset?', 'Profile reset', wx.YES_NO | wx.ICON_QUESTION) result = dlg.ShowModal() == wx.ID_YES dlg.Destroy() if result: profile.resetGlobalProfile() if profile.getPreference('machine_type') == 'reprap': profile.putProfileSetting('nozzle_size', '0.5') profile.putProfileSetting('machine_center_x', '40') profile.putProfileSetting('machine_center_y', '40') self.updateProfileToControls()
def OnResetProfile(self, e): dlg = wx.MessageDialog( self, "This will reset all profile settings to defaults.\nUnless you have saved your current profile, all settings will be lost!\nDo you really want to reset?", "Profile reset", wx.YES_NO | wx.ICON_QUESTION, ) result = dlg.ShowModal() == wx.ID_YES dlg.Destroy() if result: profile.resetGlobalProfile() if profile.getPreference("machine_type") == "reprap": profile.putProfileSetting("nozzle_size", "0.5") profile.putProfileSetting("machine_center_x", "40") profile.putProfileSetting("machine_center_y", "40") self.updateProfileToControls()