summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/automation_line.cc8
-rw-r--r--gtk2_ardour/automation_line.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index 979b969621..5e5d511250 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -973,7 +973,7 @@ AutomationLine::get_selectables (
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
double const model_when = (*(*i)->model())->when;
- framepos_t const session_frames_when = _time_converter.to (model_when - _offset) + _time_converter.origin_b ();
+ framepos_t const session_frames_when = _time_converter.to (model_when) + _time_converter.origin_b () - _offset;
if (session_frames_when >= start && session_frames_when <= end && (*i)->get_y() >= bot_track && (*i)->get_y() <= top_track) {
results.push_back (*i);
@@ -1004,8 +1004,8 @@ AutomationLine::point_selection_to_control_points (PointSelection const & s)
for (vector<ControlPoint*>::iterator j = control_points.begin(); j != control_points.end(); ++j) {
- double const rstart = trackview.editor().frame_to_unit (_time_converter.to (i->start));
- double const rend = trackview.editor().frame_to_unit (_time_converter.to (i->end));
+ double const rstart = trackview.editor().frame_to_unit (_time_converter.to (i->start) - _offset);
+ double const rend = trackview.editor().frame_to_unit (_time_converter.to (i->end) - _offset);
if ((*j)->get_x() >= rstart && (*j)->get_x() <= rend) {
if ((*j)->get_y() >= bot && (*j)->get_y() <= top) {
@@ -1020,7 +1020,7 @@ AutomationLine::point_selection_to_control_points (PointSelection const & s)
}
void
-AutomationLine::set_selected_points (PointSelection& points)
+AutomationLine::set_selected_points (PointSelection const & points)
{
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
(*i)->set_selected (false);
diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h
index 095fa14c38..5ac63fad8b 100644
--- a/gtk2_ardour/automation_line.h
+++ b/gtk2_ardour/automation_line.h
@@ -67,7 +67,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
void clear ();
std::list<ControlPoint*> point_selection_to_control_points (PointSelection const &);
- void set_selected_points (PointSelection&);
+ void set_selected_points (PointSelection const &);
void get_selectables (ARDOUR::framepos_t, ARDOUR::framepos_t, double, double, std::list<Selectable*>&);
void get_inverted_selectables (Selection&, std::list<Selectable*>& results);