Fix wrong tab order in preferences (#4210)

This commit is contained in:
Abdo 2025-07-18 18:20:10 +03:00 committed by GitHub
parent 278a84f8d2
commit 63ddd0e183
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -1292,9 +1292,10 @@
<tabstop>daily_backups</tabstop>
<tabstop>weekly_backups</tabstop>
<tabstop>monthly_backups</tabstop>
<tabstop>tabWidget</tabstop>
<tabstop>syncAnkiHubLogout</tabstop>
<tabstop>syncAnkiHubLogin</tabstop>
<tabstop>buttonBox</tabstop>
<tabstop>tabWidget</tabstop>
</tabstops>
<resources/>
<connections>

View file

@ -82,11 +82,14 @@ class Preferences(QDialog):
)
group = self.form.preferences_answer_keys
group.setLayout(layout := QFormLayout())
tab_widget: QWidget = self.form.url_schemes
for ease, label in ease_labels:
layout.addRow(
label,
line_edit := QLineEdit(self.mw.pm.get_answer_key(ease) or ""),
)
QWidget.setTabOrder(tab_widget, line_edit)
tab_widget = line_edit
qconnect(
line_edit.textChanged,
functools.partial(self.mw.pm.set_answer_key, ease),