summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibGUI/Dialog.cpp')
-rw-r--r--Userland/Libraries/LibGUI/Dialog.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/Dialog.cpp b/Userland/Libraries/LibGUI/Dialog.cpp
index 199ea47326..90147459a7 100644
--- a/Userland/Libraries/LibGUI/Dialog.cpp
+++ b/Userland/Libraries/LibGUI/Dialog.cpp
@@ -112,6 +112,8 @@ Dialog::ExecResult Dialog::exec()
void Dialog::done(ExecResult result)
{
+ Window::close();
+
if (!m_event_loop)
return;
m_result = result;
@@ -137,7 +139,6 @@ void Dialog::event(Core::Event& event)
void Dialog::close()
{
- Window::close();
done(ExecResult::Cancel);
}