any_keycode_dialog: restrict keycodes user can enter

main
Ilya Zhuravlev 2021-02-01 13:14:52 -05:00
parent 2675f2ff44
commit 19895d280c
1 changed files with 1 additions and 1 deletions

View File

@ -161,4 +161,4 @@ class AnyKeycodeDialog(QDialog):
self.value = -1
self.lbl_computed.setText(tr("AnyKeycodeDialog", "Invalid input"))
self.buttons.button(QDialogButtonBox.Ok).setEnabled(self.value != -1)
self.buttons.button(QDialogButtonBox.Ok).setEnabled(0 <= self.value < 2 ** 16)