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
commit eed63e8174
Notes: sideshowbarker 2024-07-17 16:42:19 +09:00

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