mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:07:34 +00:00
TextEditor+HexEditor: Warn about unsaved changes after dropping files
This commit is contained in:
parent
65919bcbb5
commit
6b8d351b40
2 changed files with 4 additions and 0 deletions
|
@ -761,6 +761,8 @@ void MainWidget::drop_event(GUI::DropEvent& event)
|
|||
GUI::MessageBox::show(window(), "TextEditor can only open one file at a time!"sv, "One at a time please!"sv, GUI::MessageBox::Type::Error);
|
||||
return;
|
||||
}
|
||||
if (!request_close())
|
||||
return;
|
||||
|
||||
// TODO: A drop event should be considered user consent for opening a file
|
||||
auto response = FileSystemAccessClient::Client::the().try_request_file(window(), urls.first().path(), Core::OpenMode::ReadOnly);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue