diff --git a/qt/aqt/browser/browser.py b/qt/aqt/browser/browser.py index a71cf2e15..ffc38fe6b 100644 --- a/qt/aqt/browser/browser.py +++ b/qt/aqt/browser/browser.py @@ -9,7 +9,13 @@ import aqt import aqt.forms from anki._legacy import deprecated from anki.cards import Card, CardId -from anki.collection import Collection, Config, OpChanges, SearchNode +from anki.collection import ( + Collection, + Config, + OpChanges, + OpChangesWithCount, + SearchNode, +) from anki.consts import * from anki.errors import NotFoundError from anki.lang import without_unicode_isolation @@ -54,6 +60,7 @@ from aqt.utils import ( saveState, showWarning, skip_if_selection_is_empty, + tooltip, tr, ) @@ -593,11 +600,16 @@ class Browser(QMainWindow): return nids = self.table.get_selected_note_ids() - # select the next card if there is one - self.focusTo = self.editor.currentField - self.table.to_next_row() - remove_notes(parent=self, note_ids=nids).run_in_background() + def after_remove(changes: OpChangesWithCount) -> None: + tooltip(tr.browsing_cards_deleted(count=changes.count)) + # select the next card if there is one + self.focusTo = self.editor.currentField + self.table.to_next_row() + + remove_notes(parent=self, note_ids=nids).success( + after_remove + ).run_in_background() # legacy