Skip to content

Commit

Permalink
Attempt to overcome "window was deleted before its visibility changed…
Browse files Browse the repository at this point in the history
…" error
  • Loading branch information
aivarannamaa committed Jun 2, 2023
1 parent f5ed255 commit fb78031
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Version history
* Rename "Raspberry Pi" initial settings to "Raspberry Pi (simple)"
* Update several translations
* Add en_GB translation
* Attempt to overcome "window was deleted before its visibility changed" error


4.1.0b1 (2023-04-23)
Expand Down
8 changes: 7 additions & 1 deletion thonny/ui_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2225,7 +2225,13 @@ def show_dialog(dlg, master=None, width=None, height=None, modal=True):
_place_window(dlg, master, width=width, height=height)

dlg.lift()
dlg.wait_visibility()
try:
dlg.wait_visibility()
except tk.TclError as e:
if "was deleted before its visibility changed" in str(e):
return
else:
raise

if modal:
try:
Expand Down

0 comments on commit fb78031

Please sign in to comment.