Set up ArdourButton state to match the action when the
authorCarl Hetherington <carl@carlh.net>
Sun, 11 Dec 2011 17:08:47 +0000 (17:08 +0000)
committerCarl Hetherington <carl@carlh.net>
Sun, 11 Dec 2011 17:08:47 +0000 (17:08 +0000)
action is attached.  Fixes #4523.

git-svn-id: svn://localhost/ardour2/branches/3.0@10979 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour_button.cc

index 778be28f2067bf94ca8c75285bae4db81f2bf0e6..4689b912f36394b8159e3bba0fb39c20df31d723 100644 (file)
@@ -543,6 +543,7 @@ ArdourButton::set_related_action (RefPtr<Action> act)
 
                Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (_action);
                if (tact) {
+                       action_toggled ();
                        tact->signal_toggled().connect (sigc::mem_fun (*this, &ArdourButton::action_toggled));
                }