mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-05 05:22:58 -05:00
Wait for the asynchronous Save As commit after confirming its options
This commit is contained in:
1 parent
c376fcda95
commit
30b7a65ab7
1 file changed
+5
-2
@@ -115,13 +115,16 @@ try:
|
||||
time.sleep(.4)
|
||||
assert user.PostMessageW(button[0],245,0,0)
|
||||
time.sleep(.8)
|
||||
confirmed=False
|
||||
def saved():
|
||||
nonlocal confirmed
|
||||
if filename.exists() and filename.stat().st_size>0:
|
||||
return True
|
||||
dialogs=state()["dialogs"]
|
||||
if dialogs:
|
||||
print("Confirming format options",dialogs[-1].get("kind"),flush=True)
|
||||
if dialogs and not confirmed:
|
||||
print("Confirming format options",dialogs[-1].get("title"),flush=True)
|
||||
call("ui.dialog.confirm")
|
||||
confirmed=True
|
||||
return False
|
||||
try:
|
||||
wait(saved, f"Missing {filename}")
|
||||
|
||||
Reference in new issue
Block a user