temperature: fix pre-selection close #1377
This commit is contained in:
parent
6815e9cabc
commit
954042691d
@ -25,15 +25,21 @@ class Panel(ScreenPanel):
|
|||||||
self.h = self.f = 0
|
self.h = self.f = 0
|
||||||
self.tempdeltas = ["1", "5", "10", "25"]
|
self.tempdeltas = ["1", "5", "10", "25"]
|
||||||
self.tempdelta = self.tempdeltas[-2]
|
self.tempdelta = self.tempdeltas[-2]
|
||||||
self.show_preheat = False
|
self.show_preheat = self._printer.state in ("printing", "paused")
|
||||||
self.preheat_options = self._screen._config.get_preheat_options()
|
self.preheat_options = self._screen._config.get_preheat_options()
|
||||||
self.grid = Gtk.Grid(row_homogeneous=True, column_homogeneous=True)
|
self.grid = Gtk.Grid(row_homogeneous=True, column_homogeneous=True)
|
||||||
self._gtk.reset_temp_color()
|
self._gtk.reset_temp_color()
|
||||||
|
|
||||||
# When printing start in temp_delta mode and only select tools
|
if self._screen.vertical_mode:
|
||||||
|
self.grid.attach(self.create_left_panel(), 0, 0, 1, 3)
|
||||||
|
self.grid.attach(self.create_right_panel(), 0, 3, 1, 2)
|
||||||
|
else:
|
||||||
|
self.grid.attach(self.create_left_panel(), 0, 0, 1, 1)
|
||||||
|
self.grid.attach(self.create_right_panel(), 1, 0, 1, 1)
|
||||||
|
|
||||||
|
# When printing start only select tools
|
||||||
selection = []
|
selection = []
|
||||||
if self._printer.state not in ("printing", "paused"):
|
if self._printer.state not in ("printing", "paused"):
|
||||||
self.show_preheat = True
|
|
||||||
selection.extend(self._printer.get_temp_devices())
|
selection.extend(self._printer.get_temp_devices())
|
||||||
elif extra:
|
elif extra:
|
||||||
selection.append(extra)
|
selection.append(extra)
|
||||||
@ -49,13 +55,6 @@ class Panel(ScreenPanel):
|
|||||||
if h not in self.active_heaters:
|
if h not in self.active_heaters:
|
||||||
self.select_heater(None, h)
|
self.select_heater(None, h)
|
||||||
|
|
||||||
if self._screen.vertical_mode:
|
|
||||||
self.grid.attach(self.create_left_panel(), 0, 0, 1, 3)
|
|
||||||
self.grid.attach(self.create_right_panel(), 0, 3, 1, 2)
|
|
||||||
else:
|
|
||||||
self.grid.attach(self.create_left_panel(), 0, 0, 1, 1)
|
|
||||||
self.grid.attach(self.create_right_panel(), 1, 0, 1, 1)
|
|
||||||
|
|
||||||
self.content.add(self.grid)
|
self.content.add(self.grid)
|
||||||
|
|
||||||
def create_right_panel(self):
|
def create_right_panel(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user