mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
reuse the existing backend instead of creating a new one
This commit is contained in:
parent
ba17567617
commit
d03e13a1bd
1 changed files with 2 additions and 2 deletions
|
@ -462,7 +462,7 @@ close the profile or restart Anki."""
|
||||||
|
|
||||||
def _loadCollection(self) -> bool:
|
def _loadCollection(self) -> bool:
|
||||||
cpath = self.pm.collectionPath()
|
cpath = self.pm.collectionPath()
|
||||||
self.col = Collection(cpath)
|
self.col = Collection(cpath, backend=self.backend)
|
||||||
|
|
||||||
self.setEnabled(True)
|
self.setEnabled(True)
|
||||||
self.maybeEnableUndo()
|
self.maybeEnableUndo()
|
||||||
|
@ -471,7 +471,7 @@ close the profile or restart Anki."""
|
||||||
|
|
||||||
def reopen(self):
|
def reopen(self):
|
||||||
cpath = self.pm.collectionPath()
|
cpath = self.pm.collectionPath()
|
||||||
self.col = Collection(cpath)
|
self.col = Collection(cpath, backend=self.backend)
|
||||||
|
|
||||||
def unloadCollection(self, onsuccess: Callable) -> None:
|
def unloadCollection(self, onsuccess: Callable) -> None:
|
||||||
def callback():
|
def callback():
|
||||||
|
|
Loading…
Reference in a new issue