diff options
author | Carl Hetherington <carl@carlh.net> | 2012-04-22 14:03:07 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-04-22 14:03:07 +0000 |
commit | a4434809e147d7f091fd488d047c531ff4c344c9 (patch) | |
tree | 2ffc14ef55a0ca310b4f772bcb87d662084a752c /gtk2_ardour/time_info_box.cc | |
parent | 82c867bf2a6f4de102707b812a87d68e3bd6e170 (diff) |
Use a list of ControlPoints to hold the automation selection,
rather than a time range. This makes more sense now that we
display every point on an automation line, rather than just
a subset. Makes the code a fair bit simpler, and should fix
some unexpected behaviours, especially when cutting automation
points.
git-svn-id: svn://localhost/ardour2/branches/3.0@12054 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_info_box.cc')
-rw-r--r-- | gtk2_ardour/time_info_box.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk2_ardour/time_info_box.cc b/gtk2_ardour/time_info_box.cc index 00b760952c..12cc8d7571 100644 --- a/gtk2_ardour/time_info_box.cc +++ b/gtk2_ardour/time_info_box.cc @@ -32,6 +32,8 @@ #include "time_info_box.h" #include "audio_clock.h" #include "editor.h" +#include "control_point.h" +#include "automation_line.h" #include "i18n.h" @@ -267,8 +269,9 @@ TimeInfoBox::selection_changed () s = max_framepos; e = 0; for (PointSelection::iterator i = selection.points.begin(); i != selection.points.end(); ++i) { - s = min (s, (framepos_t) i->start); - e = max (e, (framepos_t) i->end); + framepos_t const p = (*i)->line().session_position ((*i)->model ()); + s = min (s, p); + e = max (e, p); } selection_start->set_off (false); selection_end->set_off (false); |