From e295c4ccfbd7b7257137e882a2e63323c0889101 Mon Sep 17 00:00:00 2001 From: evandrocoan Date: Tue, 7 Sep 2021 23:52:33 -0300 Subject: [PATCH 1/2] Fix #1355 --- ftl/core/actions.ftl | 1 + qt/aqt/reviewer.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ftl/core/actions.ftl b/ftl/core/actions.ftl index 8b7a6d8ef..2e937d146 100644 --- a/ftl/core/actions.ftl +++ b/ftl/core/actions.ftl @@ -50,6 +50,7 @@ actions-remove-notetype = Remove Notetype actions-update-notetype = Update Notetype actions-update-config = Update Config actions-card-info = Card Info +actions-previous-card-info = Previous Card Info ## Flags diff --git a/qt/aqt/reviewer.py b/qt/aqt/reviewer.py index 45e7f6c0b..a0f3f6675 100644 --- a/qt/aqt/reviewer.py +++ b/qt/aqt/reviewer.py @@ -190,6 +190,7 @@ class Reviewer: ########################################################################## def nextCard(self) -> None: + self.previous_card = self.card self.card = None self._v3 = None @@ -456,6 +457,7 @@ class Reviewer: ("Shift+v", self.onRecordVoice), ("o", self.onOptions), ("i", self.on_card_info), + ("Ctrl+i", self.on_previous_card_info), ("1", lambda: self._answerCard(1)), ("2", lambda: self._answerCard(2)), ("3", lambda: self._answerCard(3)), @@ -908,6 +910,7 @@ time = %(time)d; [tr.actions_suspend_card(), "@", self.suspend_current_card], [tr.actions_options(), "O", self.onOptions], [tr.actions_card_info(), "I", self.on_card_info], + [tr.actions_previous_card_info(), "Ctrl+I", self.on_previous_card_info], None, [tr.studying_mark_note(), "*", self.toggle_mark_on_current_note], [tr.studying_bury_note(), "=", self.bury_current_note], @@ -958,6 +961,10 @@ time = %(time)d; def onOptions(self) -> None: confirm_deck_then_display_options(self.card) + def on_previous_card_info(self) -> None: + if self.previous_card: + CardInfoDialog(parent=self.mw, mw=self.mw, card=self.previous_card) + def on_card_info(self) -> None: if self.card: CardInfoDialog(parent=self.mw, mw=self.mw, card=self.card) From 23891918cb648db4b4d47cdf3986fa98c8d956f0 Mon Sep 17 00:00:00 2001 From: evandrocoan Date: Wed, 8 Sep 2021 21:26:48 -0300 Subject: [PATCH 2/2] Use Alt+i for previous/last card info because Ctrl+i could easily confuse a user that Ctrl+i is for the current card. Ctrl was first added because it is easier to press, at least for me, then, I press first using Ctrl and if not available go to Alt. --- qt/aqt/reviewer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/aqt/reviewer.py b/qt/aqt/reviewer.py index a0f3f6675..fd9b64eb2 100644 --- a/qt/aqt/reviewer.py +++ b/qt/aqt/reviewer.py @@ -457,7 +457,7 @@ class Reviewer: ("Shift+v", self.onRecordVoice), ("o", self.onOptions), ("i", self.on_card_info), - ("Ctrl+i", self.on_previous_card_info), + ("Alt+i", self.on_previous_card_info), ("1", lambda: self._answerCard(1)), ("2", lambda: self._answerCard(2)), ("3", lambda: self._answerCard(3)), @@ -910,7 +910,7 @@ time = %(time)d; [tr.actions_suspend_card(), "@", self.suspend_current_card], [tr.actions_options(), "O", self.onOptions], [tr.actions_card_info(), "I", self.on_card_info], - [tr.actions_previous_card_info(), "Ctrl+I", self.on_previous_card_info], + [tr.actions_previous_card_info(), "Alt+I", self.on_previous_card_info], None, [tr.studying_mark_note(), "*", self.toggle_mark_on_current_note], [tr.studying_bury_note(), "=", self.bury_current_note],