reuse the existing backend instead of creating a new one

This commit is contained in:
Damien Elmes 2020-03-14 09:50:06 +10:00
parent ba17567617
commit d03e13a1bd

View file

@ -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():