From eed63e817422ef6582607df93d29577607202bde Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Tue, 10 Jan 2023 22:41:12 +0100 Subject: ThemeEditor: Warn about unsaved changes on file drop --- Userland/Applications/ThemeEditor/MainWidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Applications/ThemeEditor/MainWidget.cpp b/Userland/Applications/ThemeEditor/MainWidget.cpp index 6c123a04d8..abb662bde3 100644 --- a/Userland/Applications/ThemeEditor/MainWidget.cpp +++ b/Userland/Applications/ThemeEditor/MainWidget.cpp @@ -666,6 +666,8 @@ void MainWidget::drop_event(GUI::DropEvent& event) GUI::MessageBox::show(window(), "ThemeEditor can only open one file at a time!"sv, "One at a time please!"sv, GUI::MessageBox::Type::Error); return; } + if (request_close() == GUI::Window::CloseRequestDecision::StayOpen) + return; auto response = FileSystemAccessClient::Client::the().request_file(window(), urls.first().path(), Core::Stream::OpenMode::Read); if (response.is_error()) -- cgit v1.2.3