mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
only reset() if there's an active deck
This commit is contained in:
parent
3bfb60c757
commit
ef5e94db9e
1 changed files with 4 additions and 3 deletions
|
@ -133,9 +133,10 @@ class AnkiQt(QMainWindow):
|
|||
|
||||
def reset(self, type="all", *args):
|
||||
"Called for non-trivial edits. Rebuilds queue and updates UI."
|
||||
self.deck.reset()
|
||||
runHook("reset")
|
||||
self.moveToState(self.state)
|
||||
if self.deck:
|
||||
self.deck.reset()
|
||||
runHook("reset")
|
||||
self.moveToState(self.state)
|
||||
|
||||
def requireReset(self, modal=False):
|
||||
"Signal queue needs to be rebuilt when edits are finished or by user."
|
||||
|
|
Loading…
Reference in a new issue