mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Allow to select region-gain points via rubber-band drag
This commit is contained in:
parent
64d633cd26
commit
1f4490fff9
3 changed files with 26 additions and 20 deletions
|
|
@ -948,14 +948,13 @@ void
|
|||
AutomationLine::get_selectables (timepos_t const & start, timepos_t const & end, double botfrac, double topfrac, list<Selectable*>& results)
|
||||
{
|
||||
/* convert fractions to display coordinates with 0 at the top of the track */
|
||||
double const bot_track = (1 - topfrac) * trackview.current_height ();
|
||||
double const top_track = (1 - botfrac) * trackview.current_height ();
|
||||
double const bot_track = (1 - topfrac) * trackview.current_height (); // this should StreamView::child_height () for RegionGain
|
||||
double const top_track = (1 - botfrac) * trackview.current_height (); // --"--
|
||||
|
||||
for (auto const & cp : control_points) {
|
||||
|
||||
const timepos_t w = session_position ((*cp->model())->when);
|
||||
|
||||
|
||||
if (w >= start && w <= end && cp->get_y() >= bot_track && cp->get_y() <= top_track) {
|
||||
results.push_back (cp);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue