Skip to content

Commit

Permalink
Fix crash on startup with tabbed mode enabled
Browse files Browse the repository at this point in the history
Re-enable tabbed mode but keep it hidden from GUI
  • Loading branch information
kliment committed Mar 24, 2018
1 parent 1bd0145 commit 979df4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions printrun/gui/controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def add_extra_controls(self, root, parentpanel, extra_buttons = None, mini_mode
}

if standalone_mode:
pos_mapping["tempgraph"] = (base_line + 5, 0)
span_mapping["tempgraph"] = (5, 6)
pos_mapping["tempgraph"] = (base_line + 6, 0)
span_mapping["tempgraph"] = (3, 2)
elif mini_mode:
pos_mapping["tempgraph"] = (base_line + 2, 0)
span_mapping["tempgraph"] = (1, 5)
Expand Down
7 changes: 4 additions & 3 deletions printrun/pronterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def reload_ui(self, *args):
# Create UI
self.create_menu()
self.update_recent_files("recentfiles", self.settings.recentfiles)
if 0: #self.settings.uimode in (_("Tabbed"), _("Tabbed with platers")): #disable tabbed mode for now
if self.settings.uimode in (_("Tabbed"), _("Tabbed with platers")):
self.createTabbedGui()
else:
self.createGui(self.settings.uimode == _("Compact"),
Expand Down Expand Up @@ -573,9 +573,9 @@ def plate_gcode(self, e):
def platecb(self, name):
self.log(_("Plated %s") % name)
self.loadfile(None, name)
#if self.settings.uimode in (_("Tabbed"), _("Tabbed with platers")):
if self.settings.uimode in (_("Tabbed"), _("Tabbed with platers")):
# Switch to page 1 (Status tab)
# self.notebook.SetSelection(1)
self.notebook.SetSelection(1)

def do_editgcode(self, e = None):
if self.filename is not None:
Expand Down Expand Up @@ -888,6 +888,7 @@ def _add_settings(self, size):
self.settings._add(BooleanSetting("display_progress_on_printer", False, _("Display progress on printer"), _("Show progress on printers display (sent via M117, might not be supported by all printers)"), "Printer"))
self.settings._add(SpinSetting("printer_progress_update_interval", 10., 0, 120, _("Printer progress update interval"), _("Interval in which pronterface sends the progress to the printer if enabled, in seconds"), "Printer"))
self.settings._add(ComboSetting("uimode", _("Standard"), [_("Standard"), _("Compact"), ], _("Interface mode"), _("Standard interface is a one-page, three columns layout with controls/visualization/log\nCompact mode is a one-page, two columns layout with controls + log/visualization"), "UI"), self.reload_ui)
#self.settings._add(ComboSetting("uimode", _("Standard"), [_("Standard"), _("Compact"), _("Tabbed"), _("Tabbed with platers")], _("Interface mode"), _("Standard interface is a one-page, three columns layout with controls/visualization/log\nCompact mode is a one-page, two columns layout with controls + log/visualization"), "UI"), self.reload_ui)
self.settings._add(ComboSetting("controlsmode", "Standard", ["Standard", "Mini"], _("Controls mode"), _("Standard controls include all controls needed for printer setup and calibration, while Mini controls are limited to the ones needed for daily printing"), "UI"), self.reload_ui)
self.settings._add(BooleanSetting("slic3rintegration", False, _("Enable Slic3r integration"), _("Add a menu to select Slic3r profiles directly from Pronterface"), "UI"), self.reload_ui)
self.settings._add(BooleanSetting("slic3rupdate", False, _("Update Slic3r default presets"), _("When selecting a profile in Slic3r integration menu, also save it as the default Slic3r preset"), "UI"))
Expand Down

0 comments on commit 979df4a

Please sign in to comment.