diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-06-29 14:29:53 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-06-29 14:29:53 +0000 |
commit | 4df4574be472b599e149af2ef161ed505088e71a (patch) | |
tree | 4e20f4761188f915f4604e24e8438e94befe1bd3 /gtk2_ardour/actions.cc | |
parent | 48fc492253cdbde32979c1dd0dbc1dcb829f802c (diff) |
editor toggle button fix from lincoln; refresh location display when loop range changes; fix up BufferSet::merge_from() to be less fragile to wierd merge conditions
git-svn-id: svn://localhost/ardour2/branches/3.0@5297 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/actions.cc')
-rw-r--r-- | gtk2_ardour/actions.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk2_ardour/actions.cc b/gtk2_ardour/actions.cc index 322dd9fccf..5e9c067476 100644 --- a/gtk2_ardour/actions.cc +++ b/gtk2_ardour/actions.cc @@ -364,6 +364,7 @@ void ActionManager::toggle_config_state (const char* group, const char* action, bool (RCConfiguration::*set)(bool), bool (RCConfiguration::*get)(void) const) { Glib::RefPtr<Action> act = ActionManager::get_action (group, action); + if (act) { Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act); @@ -381,12 +382,15 @@ void ActionManager::toggle_config_state_foo (const char* group, const char* action, sigc::slot<bool, bool> set, sigc::slot<bool> get) { Glib::RefPtr<Action> act = ActionManager::get_action (group, action); + if (act) { Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act); - if (tact->get_active()) { + + if (tact) { bool const x = get (); + if (x != tact->get_active ()) { - set (x); + set (!x); } } } |