fix initial display of solo-model in monitor section
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 4 Nov 2011 02:46:59 +0000 (02:46 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 4 Nov 2011 02:46:59 +0000 (02:46 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@10433 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/monitor_section.cc

index dcfdefd41664a65a9840bd16d0836d6e77741c8f..0926794175befd7b0322c64ae5ed28f70dc50a99 100644 (file)
@@ -93,12 +93,6 @@ MonitorSection::MonitorSection (Session* s)
        afl_button.set_name ("monitor section solo model");
        pfl_button.set_name ("monitor section solo model");
 
-#if 0
-       solo_model_group.add (solo_in_place_button);
-       solo_model_group.add (afl_button);
-       solo_model_group.add (afl_button);
-#endif
-
         solo_model_box.set_spacing (6);
         solo_model_box.pack_start (solo_in_place_button, true, false);
         solo_model_box.pack_start (afl_button, true, false);
@@ -846,10 +840,19 @@ MonitorSection::update_solo_model ()
 
         act = ActionManager::get_action (X_("Solo"), action_name);
         if (act) {
+
                 Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic (act);
                 if (ract) {
+                       /* because these are radio buttons, one of them will be
+                          active no matter what. to trigger a change in the
+                          action so that the view picks it up, toggle it.
+                       */
+                       if (ract->get_active()) {
+                               ract->set_active (false);
+                       }
                         ract->set_active (true);
                 }
+               
         }
 }