From 3b792049249b5d7d4a96827ff22528558d4ac389 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 31 Aug 2017 20:38:12 +1000 Subject: [PATCH] update self.card on multiple selection fixes https://anki.tenderapp.com/discussions/beta-testing/713-anki-210-beta-13#comment_43315776 --- aqt/browser.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aqt/browser.py b/aqt/browser.py index d9551105f..fb2ce60e8 100644 --- a/aqt/browser.py +++ b/aqt/browser.py @@ -608,12 +608,14 @@ class Browser(QMainWindow): update = self.updateTitle() show = self.model.cards and update == 1 self.form.splitter.widget(1).setVisible(not not show) + idx = self.form.tableView.selectionModel().currentIndex() + if idx.isValid(): + self.card = self.model.getCard(idx) + if not show: self.editor.setNote(None) self.singleCard = False else: - self.card = self.model.getCard( - self.form.tableView.selectionModel().currentIndex()) self.editor.setNote(self.card.note(reload=True), focusTo=self.focusTo) self.focusTo = None self.editor.card = self.card