Rebuild study queues if v3 scheduler toggled (#2448)

Closes #2418.
This commit is contained in:
RumovZ 2023-03-19 02:17:44 +01:00 committed by GitHub
parent 039ebfeed6
commit 8a4667c505
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@ import aqt.forms
import aqt.operations
from anki.collection import OpChanges
from anki.consts import new_card_scheduling_labels
from aqt import AnkiQt
from aqt import AnkiQt, gui_hooks
from aqt.operations.collection import set_preferences
from aqt.profiles import VideoDriver
from aqt.qt import *
@ -150,6 +150,7 @@ class Preferences(QDialog):
want_v3 = form.sched2021.isChecked()
if self.mw.col.v3_scheduler() != want_v3:
self.mw.col.set_v3_scheduler(want_v3)
gui_hooks.operation_did_execute(OpChanges(study_queues=True), None)
on_done()