Skip to content

Commit c4c9fd5

Browse files
committed
fix: modal show
1 parent d0c3972 commit c4c9fd5

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
@@ -490,18 +490,18 @@ def height(self):
490490

491491
def _handle_modal_overlay(self) -> bool:
492492
if self._modal_overlay.overlay:
493+
# Send show event to Widget
494+
if not self._modal_overlay_shown and hasattr(self._modal_overlay.overlay, 'show_event'):
495+
self._modal_overlay.overlay.show_event()
496+
self._modal_overlay_shown = True
497+
493498
if hasattr(self._modal_overlay.overlay, 'render'):
494499
result = self._modal_overlay.overlay.render(rl.Rectangle(0, 0, self.width, self.height))
495500
elif callable(self._modal_overlay.overlay):
496501
result = self._modal_overlay.overlay()
497502
else:
498503
raise Exception
499504

500-
# Send show event to Widget
501-
if not self._modal_overlay_shown and hasattr(self._modal_overlay.overlay, 'show_event'):
502-
self._modal_overlay.overlay.show_event()
503-
self._modal_overlay_shown = True
504-
505505
if result >= 0:
506506
# Clear the overlay and execute the callback
507507
original_modal = self._modal_overlay

0 commit comments

Comments
 (0)