Apply same ctrl+numpad enter fix that the add screen has
Likely regression in the switch to a main window
This commit is contained in:
parent
a7b8cb87de
commit
7428ecadc3
@ -109,7 +109,7 @@ class AddCards(QMainWindow):
|
||||
self.addButton = bb.addButton(tr.actions_add(), ar)
|
||||
qconnect(self.addButton.clicked, self.add_current_note)
|
||||
self.addButton.setShortcut(QKeySequence("Ctrl+Return"))
|
||||
# qt5.14 doesn't handle numpad enter on Windows
|
||||
# qt5.14+ doesn't handle numpad enter on Windows
|
||||
self.compat_add_shorcut = QShortcut(QKeySequence("Ctrl+Enter"), self)
|
||||
qconnect(self.compat_add_shorcut.activated, self.addButton.click)
|
||||
self.addButton.setToolTip(shortcut(tr.adding_add_shortcut_ctrlandenter()))
|
||||
|
@ -28,9 +28,11 @@ class EditCurrent(QMainWindow):
|
||||
self.editor.card = self.mw.reviewer.card
|
||||
self.editor.set_note(self.mw.reviewer.card.note(), focusTo=0)
|
||||
restoreGeom(self, "editcurrent")
|
||||
self.form.buttonBox.button(QDialogButtonBox.StandardButton.Close).setShortcut(
|
||||
QKeySequence("Ctrl+Return")
|
||||
)
|
||||
close_button = self.form.buttonBox.button(QDialogButtonBox.StandardButton.Close)
|
||||
close_button.setShortcut(QKeySequence("Ctrl+Return"))
|
||||
# qt5.14+ doesn't handle numpad enter on Windows
|
||||
self.compat_add_shorcut = QShortcut(QKeySequence("Ctrl+Enter"), self)
|
||||
qconnect(self.compat_add_shorcut.activated, close_button.click)
|
||||
gui_hooks.operation_did_execute.append(self.on_operation_did_execute)
|
||||
self.show()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user