layout_editor: don't emit changed signals while loading from kb
parent
e7ca2548b8
commit
40726d244d
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue