diff options
author | Karol Kosek <krkk@serenityos.org> | 2023-01-10 22:41:12 +0100 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2023-01-11 20:15:47 +0000 |
commit | eed63e817422ef6582607df93d29577607202bde (patch) | |
tree | 826617e735f8e50962ac697127be13a4213ba53f | |
parent | 5157a6f6b3a70a168f0a3bd08c9d9baa8f8f2051 (diff) | |
download | serenity-eed63e817422ef6582607df93d29577607202bde.zip |
ThemeEditor: Warn about unsaved changes on file drop
-rw-r--r-- | Userland/Applications/ThemeEditor/MainWidget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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()) |