summaryrefslogtreecommitdiff
path: root/libs/ardour/solo_control.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-11-25 11:48:18 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2016-11-25 11:48:18 +0000
commit9f3bcf968d2f98f505ecf60e93ba950677a4e7f2 (patch)
tree8dd1bb5865335860dde11e1a6b616422e468b1f4 /libs/ardour/solo_control.cc
parentc5eda4cfe1e7b9ae9abbe2e7b6bd640586a3b9fb (diff)
fix implementation of SoloControl::clear_all_solo_state()
This no longer emits Changed() unless a change was made, and more importantly, calls AutomationControl::actually_set_value() if the self-soloed value needs to be changed
Diffstat (limited to 'libs/ardour/solo_control.cc')
-rw-r--r--libs/ardour/solo_control.cc32
1 files changed, 20 insertions, 12 deletions
diff --git a/libs/ardour/solo_control.cc b/libs/ardour/solo_control.cc
index 087e5d04ab..fae2ce2623 100644
--- a/libs/ardour/solo_control.cc
+++ b/libs/ardour/solo_control.cc
@@ -191,25 +191,33 @@ SoloControl::get_value () const
void
SoloControl::clear_all_solo_state ()
{
- // ideally this function will never do anything, it only exists to forestall Murphy
+ bool change = false;
-#ifndef NDEBUG
- // these are really debug messages, but of possible interest.
if (self_soloed()) {
- PBD::info << string_compose (_("Cleared Explicit solo: %1\n"), name());
+ PBD::info << string_compose (_("Cleared Explicit solo: %1\n"), name()) << endmsg;
+ actually_set_value (0.0, Controllable::NoGroup);
+ change = true;
}
- if (_soloed_by_others_upstream || _soloed_by_others_downstream) {
- PBD::info << string_compose (_("Cleared Implicit solo: %1 up:%2 down:%3\n"),
- name(), _soloed_by_others_upstream, _soloed_by_others_downstream);
+
+ if (_soloed_by_others_upstream) {
+ PBD::info << string_compose (_("Cleared upstream solo: %1 up:%2\n"), name(), _soloed_by_others_upstream)
+ << endmsg;
+ _soloed_by_others_upstream = 0;
+ change = true;
}
-#endif
- _soloed_by_others_upstream = 0;
- _soloed_by_others_downstream = 0;
+ if (_soloed_by_others_downstream) {
+ PBD::info << string_compose (_("Cleared downstream solo: %1 down:%2\n"), name(), _soloed_by_others_downstream)
+ << endmsg;
+ _soloed_by_others_downstream = 0;
+ change = true;
+ }
- set_self_solo (false);
_transition_into_solo = 0; /* Session does not need to propagate */
- Changed (false, Controllable::UseGroup); /* EMIT SIGNAL */
+
+ if (change) {
+ Changed (false, Controllable::NoGroup); /* EMIT SIGNAL */
+ }
}
int