diff --git a/src/main/python/layout_editor.py b/src/main/python/layout_editor.py index 06b5956..96480b5 100644 --- a/src/main/python/layout_editor.py +++ b/src/main/python/layout_editor.py @@ -102,6 +102,8 @@ class LayoutEditor(BasicEditor): if not self.valid(): return + self.blockSignals(True) + for choice in self.choices: choice.delete() self.choices = [] @@ -115,6 +117,8 @@ class LayoutEditor(BasicEditor): self.unpack(self.device.keyboard.layout_options) + self.blockSignals(False) + def valid(self): return isinstance(self.device, VialKeyboard) and "labels" in self.device.keyboard.layouts @@ -137,8 +141,5 @@ class LayoutEditor(BasicEditor): def get_choice(self, index): return int(self.choices[index].pack(), 2) - def set_choice(self, index, value): - self.choices[index].change(value) - def on_changed(self): self.changed.emit()