i = self.fileMenu.Append(-1, _("Save Profile..."))
self.normalModeOnlyItems.append(i)
self.Bind(wx.EVT_MENU, self.OnSaveProfile, i)
+ if version.isDevVersion():
+ i = self.fileMenu.Append(-1, "Save difference from default...")
+ self.normalModeOnlyItems.append(i)
+ self.Bind(wx.EVT_MENU, self.OnSaveDifferences, i)
i = self.fileMenu.Append(-1, _("Load Profile from GCode..."))
self.normalModeOnlyItems.append(i)
self.Bind(wx.EVT_MENU, self.OnLoadProfileFromGcode, i)
i = toolsMenu.Append(-1, _("Auto Firmware Update..."))
self.Bind(wx.EVT_MENU, self.OnAutoFirmwareUpdate, i)
- i = toolsMenu.Append(-1, _("Copy profile to clipboard"))
- self.Bind(wx.EVT_MENU, self.onCopyProfileClipboard,i)
+ #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)
#Timer set; used to check if profile is on the clipboard
self.timer = wx.Timer(self)
self.Bind(wx.EVT_TIMER, self.onTimer)
- self.timer.Start(1000)
+ #self.timer.Start(1000)
self.lastTriedClipboard = profile.getProfileString()
# Restore the window position, size & state from the preferences file
if Publisher is not None:
Publisher().subscribe(self.onPluginUpdate, "pluginupdate")
+ pluginCount = self.normalSettingsPanel.pluginPanel.GetActivePluginCount()
+ if pluginCount == 1:
+ self.scene.notification.message("Warning: 1 plugin from the previous session is still active.")
+
+ if pluginCount > 1:
+ self.scene.notification.message("Warning: %i plugins from the previous session are still active." % pluginCount)
+
def onPluginUpdate(self,msg): #receives commands from the plugin thread
cmd = str(msg.data).split(";")
if cmd[0] == "OpenPluginProgressWindow":
# Enabled sash
self.splitter.SetSashSize(4)
self.defaultFirmwareInstallMenuItem.Enable(firmwareInstall.getDefaultFirmware() is not None)
- if profile.getMachineSetting('machine_type') == 'ultimaker2' or profile.getMachineSetting('machine_type') == 'lulzbot_mini' or profile.getMachineSetting('machine_type') == 'lulzbot_TAZ':
+ if profile.getMachineSetting('machine_type').startswith('ultimaker2') or \
+ profile.getMachineSetting('machine_type').startswith('lulzbot_'):
self.bedLevelWizardMenuItem.Enable(False)
self.headOffsetWizardMenuItem.Enable(False)
else:
self.normalSettingsPanel.updateProfileToControls()
self.simpleSettingsPanel.updateProfileToControls()
- def reloadSettingPanels(self, changedSliceMode):
+ def reloadSettingPanels(self, changedSliceMode = False):
self.leftSizer.Detach(self.simpleSettingsPanel)
self.leftSizer.Detach(self.normalSettingsPanel)
self.simpleSettingsPanel.Destroy()
dlg=wx.FileDialog(self, _("Select profile file to save"), os.path.split(profile.getPreference('lastFile'))[0], style=wx.FD_SAVE)
dlg.SetWildcard("ini files (*.ini)|*.ini")
if dlg.ShowModal() == wx.ID_OK:
- profileFile = dlg.GetPath()
- if not profileFile.lower().endswith('.ini'): #hack for linux, as for some reason the .ini is not appended.
- profileFile += '.ini'
- profile.saveProfile(profileFile)
+ profile_filename = dlg.GetPath()
+ if not profile_filename.lower().endswith('.ini'): #hack for linux, as for some reason the .ini is not appended.
+ profile_filename += '.ini'
+ profile.saveProfile(profile_filename)
+ dlg.Destroy()
+
+ def OnSaveDifferences(self, e):
+ dlg=wx.FileDialog(self, _("Select profile file to save"), os.path.split(profile.getPreference('lastFile'))[0], style=wx.FD_SAVE)
+ dlg.SetWildcard("ini files (*.ini)|*.ini")
+ if dlg.ShowModal() == wx.ID_OK:
+ profile_filename = dlg.GetPath()
+ if not profile_filename.lower().endswith('.ini'): #hack for linux, as for some reason the .ini is not appended.
+ profile_filename += '.ini'
+ profile.saveProfileDifferenceFromDefault(profile_filename)
dlg.Destroy()
def OnResetProfile(self, e):
def OnNormalSwitch(self, e):
profile.putPreference('startMode', 'Normal')
+ dlg = wx.MessageDialog(self, _("Copy the settings from quickprint to your full settings?\n(This will overwrite any full setting modifications you have)"), _("Profile copy"), wx.YES_NO | wx.ICON_QUESTION)
+ result = dlg.ShowModal() == wx.ID_YES
+ dlg.Destroy()
+ if result:
+ profile.resetProfile()
+ for k, v in self.simpleSettingsPanel.getSettingOverrides().items():
+ profile.putProfileSetting(k, v)
+ self.updateProfileToAllControls()
self.updateSliceMode()
def OnDefaultMarlinFirmware(self, e):