mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-01 03:17:39 +01:00
if a slave's masters are at zero, lock slave to zero and not NaN
This commit is contained in:
parent
2926555e29
commit
e60147d22d
1 changed files with 6 additions and 1 deletions
|
|
@ -103,7 +103,12 @@ SlavableAutomationControl::actually_set_value (double value, PBD::Controllable::
|
|||
|
||||
if (!_masters.empty()) {
|
||||
/* need to scale given value by current master's scaling */
|
||||
value /= get_masters_value_locked();
|
||||
const double masters_value = get_masters_value_locked();
|
||||
if (masters_value == 0.0) {
|
||||
value = 0.0;
|
||||
} else {
|
||||
value /= masters_value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue