mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
Handle paste from non-toggled to boolean automation track.
- sort-of fixes #6431
This commit is contained in:
parent
4a3413f2d4
commit
fcc626132e
1 changed files with 3 additions and 0 deletions
|
|
@ -1663,6 +1663,9 @@ ControlList::paste (const ControlList& alist, double pos, float /*times*/)
|
|||
value /= (src_desc.upper - src_desc.lower); // normalize range
|
||||
value *= (_desc.upper - _desc.lower); // scale to our range
|
||||
value += _desc.lower; // translate to our offset
|
||||
if (_desc.toggled) {
|
||||
value = (value < 0.5) ? 0.0 : 1.0;
|
||||
}
|
||||
}
|
||||
_events.insert (where, new ControlEvent((*i)->when + pos, value));
|
||||
end = (*i)->when + pos;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue