diff options
author | Carl Hetherington <carl@carlh.net> | 2010-01-03 12:04:29 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-01-03 12:04:29 +0000 |
commit | b1af21dae72e81e4168a2a9bdfa4f468db081873 (patch) | |
tree | 7d4cf8b9e992466ddd56cb255945c728816b4b9a | |
parent | 0f79f67398fcf319e9471e9b2b3b91e2ea6b2fee (diff) |
Fix some bugs in set_selected_control_point_from_click.
git-svn-id: svn://localhost/ardour2/branches/3.0@6438 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/editor_selection.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index 59be957138..140856efd2 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -249,9 +249,16 @@ Editor::set_selected_control_point_from_click (Selection::Operation op, bool /*n x1 = pixel_to_frame (clicked_control_point->get_x() - 10); x2 = pixel_to_frame (clicked_control_point->get_x() + 10); - y1 = clicked_control_point->get_x() - 10; + y1 = clicked_control_point->get_y() - 10; y2 = clicked_control_point->get_y() + 10; + /* convert the y values to trackview space */ + double dummy = 0; + clicked_control_point->line().parent_group().i2w (dummy, y1); + clicked_control_point->line().parent_group().i2w (dummy, y2); + _trackview_group->w2i (dummy, y1); + _trackview_group->w2i (dummy, y2); + return select_all_within (x1, x2, y1, y2, selection->tracks, op); } @@ -958,6 +965,9 @@ Editor::invert_selection () selection->set (touched); } +/** @param top Top (lower) y limit in trackview coordinates. + * @param bottom Bottom (higher) y limit in trackview coordinates. + */ bool Editor::select_all_within (nframes64_t start, nframes64_t end, double top, double bot, const TrackViewList& tracklist, Selection::Operation op) { |