From f5fbad2c20af61162c75cb08565fcb63875c2504 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 4 Jun 2021 20:37:45 +1000 Subject: [PATCH] fix CSV import ignoring selected deck This is a stop-gap - once the importing code is refactored, we should pass in the desired deck directly. https://forums.ankiweb.net/t/anki-2-1-45-alpha/10061/102 --- qt/aqt/importing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qt/aqt/importing.py b/qt/aqt/importing.py index b70d0a2f7..0fa7a7154 100644 --- a/qt/aqt/importing.py +++ b/qt/aqt/importing.py @@ -190,10 +190,10 @@ class ImportDialog(QDialog): self.mw.pm.profile["allowHTML"] = self.importer.allowHTML self.importer.tagModified = self.frm.tagModified.text() self.mw.pm.profile["tagModified"] = self.importer.tagModified - did = self.deck.selected_deck_id - self.importer.model["did"] = did + self.mw.col.set_aux_notetype_config( + self.importer.model["id"], "lastDeck", self.deck.selected_deck_id + ) self.mw.col.models.save(self.importer.model, updateReqs=False) - self.mw.col.decks.select(did) self.mw.progress.start() self.mw.checkpoint(tr.actions_import())