diff options
author | Carl Hetherington <carl@carlh.net> | 2009-06-14 17:56:29 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-06-14 17:56:29 +0000 |
commit | 57f6ec6d9a96a56bf7afdb32610ebe8e61377340 (patch) | |
tree | 4a428b583aaad760fa7e011f29e433d87bb0542a | |
parent | ebf60a31d8ad0e92109eb4b578de33a9d48cff87 (diff) |
Fix problem with turning off 'disable-disarm-during-roll' during roll
git-svn-id: svn://localhost/ardour2/branches/3.0@5190 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/route_ui.cc | 18 | ||||
-rw-r--r-- | gtk2_ardour/route_ui.h | 6 |
2 files changed, 17 insertions, 7 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 7926c9c468..6c56ab132c 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -129,6 +129,8 @@ RouteUI::init () _session.SoloChanged.connect (mem_fun(*this, &RouteUI::solo_changed_so_update_mute)); _session.TransportStateChange.connect (mem_fun (*this, &RouteUI::check_rec_enable_sensitivity)); + + Config->ParameterChanged.connect (mem_fun (*this, &RouteUI::parameter_changed)); } void @@ -1364,13 +1366,19 @@ RouteUI::save_as_template () void RouteUI::check_rec_enable_sensitivity () { - if (Config->get_disable_disarm_during_roll () == false) { - return; - } - - if (_session.transport_rolling() && rec_enable_button->get_active()) { + if (_session.transport_rolling() && rec_enable_button->get_active() && Config->get_disable_disarm_during_roll()) { rec_enable_button->set_sensitive (false); } else { rec_enable_button->set_sensitive (true); } } + +void +RouteUI::parameter_changed (string const & p) +{ + ENSURE_GUI_THREAD (bind (mem_fun (*this, &RouteUI::parameter_changed), p)); + + if (p == "disable-disarm-during-roll") { + check_rec_enable_sensitivity (); + } +} diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h index 42a373ae7b..f08495a7c6 100644 --- a/gtk2_ardour/route_ui.h +++ b/gtk2_ardour/route_ui.h @@ -183,8 +183,6 @@ class RouteUI : public virtual AxisView void save_as_template (); protected: - void check_rec_enable_sensitivity (); - std::vector<sigc::connection> connections; std::string s_name; std::string m_name; @@ -194,6 +192,10 @@ class RouteUI : public virtual AxisView void init (); void reset (); + + private: + void check_rec_enable_sensitivity (); + void parameter_changed (std::string const &); }; #endif /* __ardour_route_ui__ */ |