mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Set playlist ID when importing to new tracks
This amends730a0954andb27bb586. This also restores the original API for do_import() and do_embed() as used by Lua scripts. Note that this uses distinct IDs when importing both audio and MIDI in the same DnD request.
This commit is contained in:
parent
2433b3059f
commit
2b066293fb
8 changed files with 54 additions and 54 deletions
|
|
@ -1026,17 +1026,15 @@ EditorRegions::drag_data_received (const RefPtr<Gdk::DragContext>& context,
|
|||
return;
|
||||
}
|
||||
|
||||
string gid = Playlist::generate_pgroup_id();
|
||||
|
||||
if (_editor->convert_drop_to_paths (paths, context, x, y, data, info, dtime) == 0) {
|
||||
samplepos_t pos = 0;
|
||||
bool copy = ((context->get_actions () & (Gdk::ACTION_COPY | Gdk::ACTION_LINK | Gdk::ACTION_MOVE)) == Gdk::ACTION_COPY);
|
||||
|
||||
if (UIConfiguration::instance ().get_only_copy_imported_files () || copy) {
|
||||
_editor->do_import (paths, Editing::ImportDistinctFiles, Editing::ImportAsRegion,
|
||||
SrcBest, SMFTrackName, SMFTempoIgnore, pos, gid);
|
||||
SrcBest, SMFTrackName, SMFTempoIgnore, pos);
|
||||
} else {
|
||||
_editor->do_embed (paths, Editing::ImportDistinctFiles, ImportAsRegion, pos, gid);
|
||||
_editor->do_embed (paths, Editing::ImportDistinctFiles, ImportAsRegion, pos);
|
||||
}
|
||||
context->drag_finish (true, false, dtime);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue