diff options
author | Carl Hetherington <carl@carlh.net> | 2009-06-14 13:44:26 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-06-14 13:44:26 +0000 |
commit | addaba4204255758b7290dc896d55cfa9b7946d5 (patch) | |
tree | eb62a382989184c026bb7245c1a1e583ae8f5afe /gtk2_ardour/route_ui.cc | |
parent | 478bab5380f586d3e022839a000a86c947a29f9c (diff) |
Add option to disable track record disarm when the transport is rolling (mantis #2658)
git-svn-id: svn://localhost/ardour2/branches/3.0@5187 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r-- | gtk2_ardour/route_ui.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 7c0d908e6d..7926c9c468 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -128,6 +128,7 @@ RouteUI::init () UI::instance()->set_tip (show_sends_button, _("make mixer strips show sends to this bus"), ""); _session.SoloChanged.connect (mem_fun(*this, &RouteUI::solo_changed_so_update_mute)); + _session.TransportStateChange.connect (mem_fun (*this, &RouteUI::check_rec_enable_sensitivity)); } void @@ -482,6 +483,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev) _session.record_disenable_all (); } else { _session.record_enable_all (); + check_rec_enable_sensitivity (); } cmd->mark(); @@ -499,6 +501,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev) } else { reversibly_apply_track_boolean ("rec-enable change", &Track::set_record_enable, !track()->record_enabled(), this); + check_rec_enable_sensitivity (); } } @@ -1357,3 +1360,17 @@ RouteUI::save_as_template () _route->save_as_template (path.to_string(), name); } + +void +RouteUI::check_rec_enable_sensitivity () +{ + if (Config->get_disable_disarm_during_roll () == false) { + return; + } + + if (_session.transport_rolling() && rec_enable_button->get_active()) { + rec_enable_button->set_sensitive (false); + } else { + rec_enable_button->set_sensitive (true); + } +} |