diff options
author | Carl Hetherington <carl@carlh.net> | 2010-08-10 01:52:49 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-08-10 01:52:49 +0000 |
commit | 48063c15df30d7616739fd001f09e33720ccfa29 (patch) | |
tree | f5b7e7951be51cfc3756a92549f859e9967c96d2 /gtk2_ardour/automation_line.cc | |
parent | 75d265e38871205c2311a3d1b342e69da72b6057 (diff) |
Improve ctrl-click behaviour of automation points. Should fix #3385.
git-svn-id: svn://localhost/ardour2/branches/3.0@7584 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-rw-r--r-- | gtk2_ardour/automation_line.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index eca2b705ce..9a22c1ebad 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -990,7 +990,13 @@ AutomationLine::get_selectables ( if (collecting) { - results.push_back (new AutomationSelectable (nstart, nend, botfrac, topfrac, &trackview)); + AutomationSelectable* s = new AutomationSelectable (nstart, nend, botfrac, topfrac, &trackview); + PointSelection& ps = trackview.editor().get_selection().points; + if (find (ps.begin(), ps.end(), *s) != ps.end()) { + s->set_selected (true); + } + + results.push_back (s); collecting = false; nstart = DBL_MAX; nend = 0; @@ -1000,7 +1006,14 @@ AutomationLine::get_selectables ( } if (collecting) { - results.push_back (new AutomationSelectable (nstart, nend, botfrac, topfrac, &trackview)); + AutomationSelectable* s = new AutomationSelectable (nstart, nend, botfrac, topfrac, &trackview); + + PointSelection& ps = trackview.editor().get_selection().points; + if (find (ps.begin(), ps.end(), *s) != ps.end()) { + s->set_selected (true); + } + + results.push_back (s); } } |