add answer key shortcuts to grade now dialog (#4055)

This commit is contained in:
llama 2025-06-04 13:15:33 +08:00 committed by GitHub
parent 174b199164
commit 996fa8bcb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1139,6 +1139,9 @@ class Browser(QMainWindow):
dialog=dialog,
),
)
if key := aqt.mw.pm.get_answer_key(ease):
QShortcut(key, dialog, activated=btn.click) # type: ignore
btn.setToolTip(tr.actions_shortcut_key(key))
layout.addWidget(btn)
# Add cancel button