mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:57:44 +00:00
FileManager: Accept TreeView drop event
This commit is contained in:
parent
cd745baa86
commit
4b99dbe644
1 changed files with 2 additions and 1 deletions
|
@ -1062,13 +1062,14 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
|||
go_to_location_action->activate();
|
||||
};
|
||||
|
||||
tree_view.on_drop = [&](const GUI::ModelIndex& index, const GUI::DropEvent& event) {
|
||||
tree_view.on_drop = [&](const GUI::ModelIndex& index, GUI::DropEvent& event) {
|
||||
if (!event.mime_data().has_urls())
|
||||
return;
|
||||
auto& target_node = directories_model->node(index);
|
||||
if (!target_node.is_directory())
|
||||
return;
|
||||
copy_urls_to_directory(event.mime_data().urls(), target_node.full_path());
|
||||
event.accept();
|
||||
};
|
||||
|
||||
directory_view.open(initial_location);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue