summaryrefslogtreecommitdiff
path: root/gtk2_ardour/monitor_section.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-11-19 17:04:48 +0000
committerCarl Hetherington <carl@carlh.net>2011-11-19 17:04:48 +0000
commitd8425b4a0fc1a875a3f1fdff62e222386ce3f1b4 (patch)
treeba946b23e4aa898b2720e47666c27cd1b2eb73e5 /gtk2_ardour/monitor_section.cc
parenteb1d3e48c822b4235e8dbf58e645ea733e4523b0 (diff)
Slightly hacky fix for AFL/PFL button misbehaviour
(#4484). git-svn-id: svn://localhost/ardour2/branches/3.0@10705 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/monitor_section.cc')
-rw-r--r--gtk2_ardour/monitor_section.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk2_ardour/monitor_section.cc b/gtk2_ardour/monitor_section.cc
index 5937ca018c..7de31e7d41 100644
--- a/gtk2_ardour/monitor_section.cc
+++ b/gtk2_ardour/monitor_section.cc
@@ -45,6 +45,7 @@ MonitorSection::MonitorSection (Session* s)
, pfl_button (_("PFL"), ArdourButton::led_default_elements)
, exclusive_solo_button (ArdourButton::led_default_elements)
, solo_mute_override_button (ArdourButton::led_default_elements)
+ , _inhibit_solo_model_update (false)
{
Glib::RefPtr<Action> act;
@@ -728,7 +729,16 @@ MonitorSection::solo_use_in_place ()
if (act) {
Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (act);
if (ract) {
+ if (!ract->get_active ()) {
+ /* We are turning SiP off, which means that AFL or PFL will be turned on
+ shortly; don't update the solo model in the mean time, as if the currently
+ configured listen position is not the one that is about to be turned on,
+ things will go wrong.
+ */
+ _inhibit_solo_model_update = true;
+ }
Config->set_solo_control_is_listen_control (!ract->get_active());
+ _inhibit_solo_model_update = false;
}
}
}
@@ -815,6 +825,10 @@ MonitorSection::setup_knob_images ()
void
MonitorSection::update_solo_model ()
{
+ if (_inhibit_solo_model_update) {
+ return;
+ }
+
const char* action_name = 0;
Glib::RefPtr<Action> act;