keyboard_comm: instead of restoring non-empty macro, only restore macro if different

main
Ilya Zhuravlev 2021-01-03 08:54:12 -05:00
parent 49dc6d21ab
commit f9f2bcef58
1 changed files with 2 additions and 2 deletions

View File

@ -284,9 +284,9 @@ class Keyboard:
self.set_layout_options(data["layout_options"])
# we need to unlock the keyboard before we can restore the macros, lock it afterwards
# only do that if the user actually has macros defined
# only do that if it's different from current macros
macro = base64.b64decode(data["macro"])
if macro:
if macro != self.macro:
Unlocker.get().perform_unlock(self)
self.set_macro(macro)
self.lock()