mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
workaround for import into new deck on win32
This commit is contained in:
parent
582f89155d
commit
5e1c98d516
1 changed files with 5 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Copyright: Damien Elmes <anki@ichi2.net>
|
# Copyright: Damien Elmes <anki@ichi2.net>
|
||||||
# License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html
|
# License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html
|
||||||
|
|
||||||
import os, copy, time
|
import os, copy, time, sys
|
||||||
from PyQt4.QtGui import *
|
from PyQt4.QtGui import *
|
||||||
from PyQt4.QtCore import *
|
from PyQt4.QtCore import *
|
||||||
import anki
|
import anki
|
||||||
|
@ -140,6 +140,10 @@ class ImportDialog(QDialog):
|
||||||
self.dialog.status.setText(txt)
|
self.dialog.status.setText(txt)
|
||||||
self.file = None
|
self.file = None
|
||||||
self.maybePreview()
|
self.maybePreview()
|
||||||
|
self.parent.deck.s.flush()
|
||||||
|
if sys.platform.startswith("win32") and not self.parent.deck.path:
|
||||||
|
# this fixes a strange bug in sqlite
|
||||||
|
self.parent.deck.s.all("pragma integrity_check")
|
||||||
self.parent.reset()
|
self.parent.reset()
|
||||||
|
|
||||||
def setupMappingFrame(self):
|
def setupMappingFrame(self):
|
||||||
|
|
Loading…
Reference in a new issue