layout_editor: fix crash when we don't have layouts
parent
d186fcf7b6
commit
e8f197e2e8
|
|
@ -127,6 +127,8 @@ class LayoutEditor(BasicEditor):
|
||||||
return isinstance(self.device, VialKeyboard) and "labels" in self.device.keyboard.layouts
|
return isinstance(self.device, VialKeyboard) and "labels" in self.device.keyboard.layouts
|
||||||
|
|
||||||
def pack(self):
|
def pack(self):
|
||||||
|
if not self.choices:
|
||||||
|
return 0
|
||||||
val = ""
|
val = ""
|
||||||
for choice in self.choices:
|
for choice in self.choices:
|
||||||
val += choice.pack()
|
val += choice.pack()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue