From e7ca2548b8d9afa6e836ac0bcc29233a27055515 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Sun, 20 Dec 2020 23:05:39 -0500 Subject: [PATCH] layout_editor: fix validity check for keyboards w/o layouts --- src/main/python/layout_editor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/python/layout_editor.py b/src/main/python/layout_editor.py index a8ec023..06b5956 100644 --- a/src/main/python/layout_editor.py +++ b/src/main/python/layout_editor.py @@ -99,7 +99,7 @@ class LayoutEditor(BasicEditor): def rebuild(self, device): super().rebuild(device) - if not self.valid: + if not self.valid(): return for choice in self.choices: @@ -116,7 +116,7 @@ class LayoutEditor(BasicEditor): self.unpack(self.device.keyboard.layout_options) 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): val = ""