mirror of
https://github.com/ankitects/anki.git
synced 2025-11-13 08:07:11 -05:00
if an error occurs during progress op, reactivate main window
This commit is contained in:
parent
0f3a083278
commit
1daf8f9601
1 changed files with 6 additions and 0 deletions
|
|
@ -230,6 +230,7 @@ Please do not file a bug report with Anki.<br>""")
|
||||||
diag.setMinimumHeight(400)
|
diag.setMinimumHeight(400)
|
||||||
diag.setMinimumWidth(500)
|
diag.setMinimumWidth(500)
|
||||||
diag.exec_()
|
diag.exec_()
|
||||||
|
self.clearProgress()
|
||||||
|
|
||||||
def closeAllDeckWindows(self):
|
def closeAllDeckWindows(self):
|
||||||
ui.dialogs.closeAll()
|
ui.dialogs.closeAll()
|
||||||
|
|
@ -2661,6 +2662,11 @@ it to your friends.
|
||||||
if not self.progressWins:
|
if not self.progressWins:
|
||||||
self.unsetBusy()
|
self.unsetBusy()
|
||||||
|
|
||||||
|
def clearProgress(self):
|
||||||
|
# recover on error
|
||||||
|
self.progressWins = []
|
||||||
|
self.finishProgress()
|
||||||
|
|
||||||
def onDbProgress(self):
|
def onDbProgress(self):
|
||||||
if self.mainThread != QThread.currentThread():
|
if self.mainThread != QThread.currentThread():
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue