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:
parent
5157a6f6b3
commit
eed63e8174
1 changed files with 2 additions and 0 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue