diff --git a/ks_includes/widgets/keypad.py b/ks_includes/widgets/keypad.py index d601f493..d6cbd685 100644 --- a/ks_includes/widgets/keypad.py +++ b/ks_includes/widgets/keypad.py @@ -52,23 +52,21 @@ class Keypad(Gtk.Box): self.pid = self._gtk.Button('heat-up', _('Calibrate') + ' PID', None, .66, Gtk.PositionType.LEFT, 1) self.pid.connect("clicked", self.update_entry, "PID") self.pid.set_sensitive(False) + self.pid.set_no_show_all(True) b = self._gtk.Button('cancel', _('Close'), None, .66, Gtk.PositionType.LEFT, 1) b.connect("clicked", close_function) self.add(self.labels['entry']) self.add(numpad) self.bottom = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL) + self.bottom.add(self.pid) self.bottom.add(b) self.add(self.bottom) self.labels["keypad"] = numpad def show_pid(self, can_pid): - if can_pid and self.pid not in self.bottom: - self.bottom.add(self.pid) - self.bottom.reorder_child(self.pid, 0) - elif self.pid in self.bottom: - self.bottom.remove(self.pid) + self.pid.set_visible(can_pid) def clear(self): self.labels['entry'].set_text("")