mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Unify Region Drag/Drop
Identify Regions using PDB::ID. This allows dragging regions from almost anywhere to anywhere, without special cases.
This commit is contained in:
parent
5427cec821
commit
0204ea1f24
13 changed files with 64 additions and 118 deletions
|
|
@ -268,8 +268,7 @@ Editor::initialize_canvas ()
|
|||
|
||||
vector<TargetEntry> target_table;
|
||||
|
||||
target_table.push_back (TargetEntry ("x-ardour/region.erl", TARGET_SAME_APP)); // DnD from the region list will generate this target
|
||||
target_table.push_back (TargetEntry ("x-ardour/region.esl", TARGET_SAME_APP)); // DnD from the source list will generate this target
|
||||
target_table.push_back (TargetEntry ("x-ardour/region.pbdid", TARGET_SAME_APP));
|
||||
target_table.push_back (TargetEntry ("text/uri-list"));
|
||||
target_table.push_back (TargetEntry ("text/plain"));
|
||||
target_table.push_back (TargetEntry ("application/x-rootwin-drop"));
|
||||
|
|
@ -391,10 +390,8 @@ Editor::track_canvas_drag_data_received (const RefPtr<Gdk::DragContext>& context
|
|||
if (!ARDOUR_UI_UTILS::engine_is_running ()) {
|
||||
return;
|
||||
}
|
||||
if (data.get_target() == "x-ardour/region.erl") {
|
||||
drop_regions (context, x, y, data, info, time, true);
|
||||
} else if (data.get_target() == "x-ardour/region.esl") {
|
||||
drop_regions (context, x, y, data, info, time, false);
|
||||
if (data.get_target() == "x-ardour/region.pbdid") {
|
||||
drop_regions (context, x, y, data, info, time);
|
||||
} else {
|
||||
drop_paths (context, x, y, data, info, time);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue