Merge pull request #797 from abdnh/importing-fix
Fix notes being imported to the wrong deck in some cases
This commit is contained in:
commit
930c264399
@ -115,13 +115,6 @@ class ImportDialog(QDialog):
|
|||||||
self.importer.model = self.mw.col.models.current()
|
self.importer.model = self.mw.col.models.current()
|
||||||
self.importer.initMapping()
|
self.importer.initMapping()
|
||||||
self.showMapping()
|
self.showMapping()
|
||||||
if self.mw.col.conf.get("addToCur", True):
|
|
||||||
did = self.mw.col.conf["curDeck"]
|
|
||||||
if self.mw.col.decks.isDyn(did):
|
|
||||||
did = 1
|
|
||||||
else:
|
|
||||||
did = self.importer.model["did"]
|
|
||||||
# self.deck.setText(self.mw.col.decks.name(did))
|
|
||||||
|
|
||||||
def onDelimiter(self):
|
def onDelimiter(self):
|
||||||
str = (
|
str = (
|
||||||
@ -189,7 +182,6 @@ you can enter it here. Use \\t to represent tab."""
|
|||||||
self.importer.tagModified = self.frm.tagModified.text()
|
self.importer.tagModified = self.frm.tagModified.text()
|
||||||
self.mw.pm.profile["tagModified"] = self.importer.tagModified
|
self.mw.pm.profile["tagModified"] = self.importer.tagModified
|
||||||
did = self.deck.selectedId()
|
did = self.deck.selectedId()
|
||||||
if did != self.importer.model["did"]:
|
|
||||||
self.importer.model["did"] = did
|
self.importer.model["did"] = did
|
||||||
self.mw.col.models.save(self.importer.model, updateReqs=False)
|
self.mw.col.models.save(self.importer.model, updateReqs=False)
|
||||||
self.mw.col.decks.select(did)
|
self.mw.col.decks.select(did)
|
||||||
|
Loading…
Reference in New Issue
Block a user