mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Fix full sync dialog failing to appear
The changed timing in 7784321b90
caused
the question dialog to use the progress window as the parent, which
meant it got closed when the progress window closes moments afterwards.
https://forums.ankiweb.net/t/anki-24-04-beta-rc/41792/69
This commit is contained in:
parent
8c9d7d64d9
commit
1d4d7ee7ed
3 changed files with 4 additions and 1 deletions
|
@ -206,7 +206,7 @@ class ProgressManager:
|
|||
maybeShow: bool = True,
|
||||
max: int | None = None,
|
||||
) -> None:
|
||||
# print self._min, self._counter, self._max, label, time.monotonic() - self._lastTime
|
||||
# print("update", label, self._levels, self._min, self._counter, self._max, label, time.monotonic() - self._shown)
|
||||
if not self.mw.inMainThread():
|
||||
print("progress.update() called on wrong thread")
|
||||
return
|
||||
|
|
|
@ -161,6 +161,7 @@ def full_sync(
|
|||
callback=callback,
|
||||
buttons=button_labels,
|
||||
default_button=2,
|
||||
parent=mw,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -208,6 +208,7 @@ def ask_user_dialog(
|
|||
| None
|
||||
) = None,
|
||||
default_button: int = 1,
|
||||
parent: QWidget | None = None,
|
||||
**kwargs: Any,
|
||||
) -> MessageBox:
|
||||
"Shows a question to the user, passes the index of the button clicked to the callback."
|
||||
|
@ -219,6 +220,7 @@ def ask_user_dialog(
|
|||
icon=QMessageBox.Icon.Question,
|
||||
buttons=buttons,
|
||||
default_button=default_button,
|
||||
parent=parent,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue