diff options
author | Carl Hetherington <carl@carlh.net> | 2009-01-06 03:18:09 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-01-06 03:18:09 +0000 |
commit | f2058a3f8739c6a7e9f7408f31d3b94ddb50673f (patch) | |
tree | 2050e2386dc670b16259805d1ecdbf8fb350fe5b /gtk2_ardour/editor_canvas.cc | |
parent | 780b75363915bd328877cba33766b1ac177b45c1 (diff) |
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
Diffstat (limited to 'gtk2_ardour/editor_canvas.cc')
-rw-r--r-- | gtk2_ardour/editor_canvas.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index 62de67cd22..89cf608989 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -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 */ |