Skip to content

Commit 21cad55

Browse files
committed
fix: modal show
1 parent a8cfa2e commit 21cad55

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

system/ui/lib/application.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -549,18 +549,18 @@ def height(self):
549549

550550
def _handle_modal_overlay(self) -> bool:
551551
if self._modal_overlay.overlay:
552+
# Send show event to Widget
553+
if not self._modal_overlay_shown and hasattr(self._modal_overlay.overlay, 'show_event'):
554+
self._modal_overlay.overlay.show_event()
555+
self._modal_overlay_shown = True
556+
552557
if hasattr(self._modal_overlay.overlay, 'render'):
553558
result = self._modal_overlay.overlay.render(rl.Rectangle(0, 0, self.width, self.height))
554559
elif callable(self._modal_overlay.overlay):
555560
result = self._modal_overlay.overlay()
556561
else:
557562
raise Exception
558563

559-
# Send show event to Widget
560-
if not self._modal_overlay_shown and hasattr(self._modal_overlay.overlay, 'show_event'):
561-
self._modal_overlay.overlay.show_event()
562-
self._modal_overlay_shown = True
563-
564564
if result >= 0:
565565
# Clear the overlay and execute the callback
566566
original_modal = self._modal_overlay

0 commit comments

Comments
 (0)