diff options
Diffstat (limited to 'gtk2_ardour/automation_time_axis.cc')
-rw-r--r-- | gtk2_ardour/automation_time_axis.cc | 13 |
1 files changed, 8 insertions, 5 deletions
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<Selectable*>& results) +AutomationTimeAxisView::get_selectables (framepos_t start, framepos_t end, double top, double bot, list<Selectable*>& 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) { |