From c06c6c153db6b33b93515100d839f376dc805d5d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 6 Aug 2010 23:28:44 +0000 Subject: Fix up selection of automation points. git-svn-id: svn://localhost/ardour2/branches/3.0@7556 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/automation_time_axis.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'gtk2_ardour/automation_time_axis.cc') diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 56a54c0092..b9edc4ef63 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -827,21 +827,23 @@ AutomationTimeAxisView::paste_one (AutomationLine& line, framepos_t pos, float t } void -AutomationTimeAxisView::get_selectables (nframes_t start, nframes_t end, double top, double bot, list& results) +AutomationTimeAxisView::get_selectables (framepos_t start, framepos_t end, double top, double bot, list& results) { if (!_line && !_view) { return; } - + if (touched (top, bot)) { - double topfrac; - double botfrac; /* remember: this is X Window - coordinate space starts in upper left and moves down. _y_position is the "origin" or "top" of the track. */ - double mybot = _y_position + height; + /* bottom of our track */ + double const mybot = _y_position + height; + + double topfrac; + double botfrac; if (_y_position >= top && mybot <= bot) { @@ -858,6 +860,7 @@ AutomationTimeAxisView::get_selectables (nframes_t start, nframes_t end, double topfrac = 1.0 - ((top - _y_position) / height); botfrac = 1.0 - ((bot - _y_position) / height); + } if (_line) { -- cgit v1.2.3