From: Carl Hetherington Date: Fri, 20 Apr 2007 16:34:38 +0000 (+0000) Subject: Fix update of follow-playhead state to fix mantis bug 1599 X-Git-Tag: 2.8.16~2173 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=a5c7990e0c4b992e5b18440295f37dd96ba335f8;p=ardour.git Fix update of follow-playhead state to fix mantis bug 1599 git-svn-id: svn://localhost/ardour2/trunk@1735 d708f5d6-7413-0410-9779-e7cbd77b26cf --- diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 7c05ce8165..736510fdc6 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -2104,16 +2104,16 @@ Editor::set_state (const XMLNode& node) if ((prop = node.property ("follow-playhead"))) { bool yn = (prop->value() == "yes"); + set_follow_playhead (yn); RefPtr act = ActionManager::get_action (X_("Editor"), X_("toggle-follow-playhead")); if (act) { RefPtr tact = RefPtr::cast_dynamic(act); - /* do it twice to force the change */ - tact->set_active (!yn); - tact->set_active (yn); + if (tact->get_active() != yn) { + tact->set_active (yn); + } } } - if ((prop = node.property ("region-list-sort-type"))) { region_list_sort_type = (Editing::RegionListSortType) -1; // force change reset_region_list_sort_type(str2regionlistsorttype(prop->value()));