mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
another approach to fixing modSchema bug
start the progress dialog immediately so that askUser() becomes part of the progress dialog's modality the problem with the previous approach was that beginReset() attempts to save the note again, leading to schema mismatches
This commit is contained in:
parent
166c6f4b3c
commit
85215018a5
1 changed files with 1 additions and 2 deletions
|
@ -1671,8 +1671,7 @@ Are you sure you want to continue?""")):
|
||||||
QDialog.accept(self)
|
QDialog.accept(self)
|
||||||
self.browser.mw.checkpoint(_("Change Note Type"))
|
self.browser.mw.checkpoint(_("Change Note Type"))
|
||||||
b = self.browser
|
b = self.browser
|
||||||
b.mw.col.modSchema(check=True)
|
b.mw.progress.start(immediate=True)
|
||||||
b.mw.progress.start()
|
|
||||||
b.model.beginReset()
|
b.model.beginReset()
|
||||||
mm = b.mw.col.models
|
mm = b.mw.col.models
|
||||||
mm.change(self.oldModel, self.nids, self.targetModel, fmap, cmap)
|
mm.change(self.oldModel, self.nids, self.targetModel, fmap, cmap)
|
||||||
|
|
Loading…
Reference in a new issue