Comment and (hopefully) simplify Editor::region_drag_motion_callback, fixing problems with dragging regions

to and from tracks in "stacked" display mode.  As a side-effect, enable dragging of regions between layers,
though I'm not entirely sure where this is useful or desirable just yet; dragging regions between layers
currently works in the GUI but has no effect on the model.


git-svn-id: svn://localhost/ardour2/branches/3.0@4389 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-01-06 03:18:09 +00:00
parent 780b753639
commit f2058a3f87
15 changed files with 375 additions and 220 deletions

View file

@ -462,10 +462,10 @@ Editor::idle_drop_paths (vector<ustring> paths, nframes64_t frame, double ypos)
void
Editor::drop_paths_part_two (const vector<ustring>& paths, nframes64_t frame, double ypos)
{
TimeAxisView* tvp;
AudioTimeAxisView* tv;
if ((tvp = trackview_by_y_position (ypos)) == 0) {
std::pair<TimeAxisView*, int> const tvp = trackview_by_y_position (ypos);
if (tvp.first == 0) {
/* drop onto canvas background: create new tracks */
@ -477,7 +477,7 @@ Editor::drop_paths_part_two (const vector<ustring>& paths, nframes64_t frame, do
do_embed (paths, Editing::ImportDistinctFiles, ImportAsTrack, frame);
}
} else if ((tv = dynamic_cast<AudioTimeAxisView*>(tvp)) != 0) {
} else if ((tv = dynamic_cast<AudioTimeAxisView*> (tvp.first)) != 0) {
/* check that its an audio track, not a bus */