--- a/printrun-src/printrun/gui/widgets.py Sat Jun 04 14:27:06 2016 +0200 +++ b/printrun-src/printrun/gui/widgets.py Sat Jun 04 15:18:06 2016 +0200 @@ -135,7 +135,7 @@ all_settings = pronterface.settings._all_settings() group_list = [] groups = {} - for group in ["Printer", "UI", "Viewer", "Colors", "External"]: + for group in ["Printer", "UI", "Viewer", "Colors", "External", "Laser"]: group_list.append(group) groups[group] = [] for setting in all_settings: @@ -179,8 +179,18 @@ self.SetSizerAndFit(topsizer) self.SetMinSize(self.GetSize()) -def PronterOptions(pronterface): + self.notebook = notebook + self.group_list = group_list + + def setPage(self, name): + self.notebook.ChangeSelection(self.group_list.index(name)) + +def PronterOptions(pronterface, defaulttab = None): dialog = PronterOptionsDialog(pronterface) + if defaulttab: + # set the active tab before open dialog + dialog.setPage(defaulttab) + if dialog.ShowModal() == wx.ID_OK: for setting in pronterface.settings._all_settings(): old_value = setting.value