Properly update Solo state when setting multiple ctrls

This commit is contained in:
Robin Gareus 2024-04-21 16:31:46 +02:00
parent bcbb4393fc
commit 6191f89d55
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -104,13 +104,13 @@ Session::rt_set_controls (std::shared_ptr<WeakAutomationControlList> cl, double
return; return;
} }
AutomationType type = NullAutomation; bool update_solo_state = false;
for (auto const& c : *cl) { for (auto const& c : *cl) {
std::shared_ptr<AutomationControl> ac = c.lock (); std::shared_ptr<AutomationControl> ac = c.lock ();
if (ac) { if (ac) {
ac->set_value (val, gcd); ac->set_value (val, gcd);
type = ac->desc().type; update_solo_state |= SoloAutomation == ac->desc().type;
} }
} }
@ -118,12 +118,8 @@ Session::rt_set_controls (std::shared_ptr<WeakAutomationControlList> cl, double
* that here. * that here.
*/ */
switch (type) { if (update_solo_state) {
case SoloAutomation:
update_route_solo_state (); update_route_solo_state ();
break;
default:
break;
} }
} }