mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Fix discard changes randomly being a noop on certain linux systems (#3781)
* fix discard changes randomly being a noop on certain linux systems * use QApplication.setActiveWindow instead * revert current impl * wait for the next event loop iter before calling activeWindow
This commit is contained in:
parent
fab939e0e1
commit
009a683e62
1 changed files with 3 additions and 1 deletions
|
@ -581,7 +581,9 @@ def deck_options_require_close() -> bytes:
|
|||
if isinstance(window, DeckOptionsDialog):
|
||||
window.require_close()
|
||||
|
||||
aqt.mw.taskman.run_on_main(handle_on_main)
|
||||
# on certain linux systems, askUser's QMessageBox.question unsets the active window
|
||||
# so we wait for the next event loop before querying the next current active window
|
||||
aqt.mw.taskman.run_on_main(lambda: QTimer.singleShot(0, handle_on_main))
|
||||
return b""
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue