1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:38:13 +00:00

ThemeEditor: Warn about unsaved changes on file drop

This commit is contained in:
Karol Kosek 2023-01-10 22:41:12 +01:00 committed by Sam Atkins
parent 5157a6f6b3
commit eed63e8174

View file

@ -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())