layout_editor: fix validity check for keyboards w/o layouts
parent
249c0054b4
commit
e7ca2548b8
|
|
@ -99,7 +99,7 @@ class LayoutEditor(BasicEditor):
|
||||||
def rebuild(self, device):
|
def rebuild(self, device):
|
||||||
super().rebuild(device)
|
super().rebuild(device)
|
||||||
|
|
||||||
if not self.valid:
|
if not self.valid():
|
||||||
return
|
return
|
||||||
|
|
||||||
for choice in self.choices:
|
for choice in self.choices:
|
||||||
|
|
@ -116,7 +116,7 @@ class LayoutEditor(BasicEditor):
|
||||||
self.unpack(self.device.keyboard.layout_options)
|
self.unpack(self.device.keyboard.layout_options)
|
||||||
|
|
||||||
def valid(self):
|
def valid(self):
|
||||||
return isinstance(self.device, VialKeyboard) and self.device.keyboard.layouts
|
return isinstance(self.device, VialKeyboard) and "labels" in self.device.keyboard.layouts
|
||||||
|
|
||||||
def pack(self):
|
def pack(self):
|
||||||
val = ""
|
val = ""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue