add ActionManager::rec_sensitive_actions and put "add track/bus" in this group, which is disabled during active recording
This commit is contained in:
parent
73fe0e4b97
commit
835b874e1e
@ -62,6 +62,7 @@ RelatedActions ActionManager::engine_sensitive_actions;
|
||||
RelatedActions ActionManager::engine_opposite_sensitive_actions;
|
||||
RelatedActions ActionManager::transport_sensitive_actions;
|
||||
RelatedActions ActionManager::edit_point_in_region_sensitive_actions;
|
||||
RelatedActions ActionManager::rec_sensitive_actions;
|
||||
|
||||
void
|
||||
ActionManager::init ()
|
||||
|
@ -51,6 +51,7 @@ namespace ActionManager {
|
||||
extern std::vector<Glib::RefPtr<Gtk::Action> > engine_sensitive_actions;
|
||||
extern std::vector<Glib::RefPtr<Gtk::Action> > engine_opposite_sensitive_actions;
|
||||
extern std::vector<Glib::RefPtr<Gtk::Action> > edit_point_in_region_sensitive_actions;
|
||||
extern std::vector<Glib::RefPtr<Gtk::Action> > rec_sensitive_actions;
|
||||
|
||||
extern void map_some_state (const char* group, const char* action, bool (ARDOUR::RCConfiguration::*get)() const);
|
||||
extern void map_some_state (const char* group, const char* action, bool (UIConfiguration::*get)() const);
|
||||
|
@ -4982,16 +4982,21 @@ ARDOUR_UI::record_state_changed ()
|
||||
{
|
||||
ENSURE_GUI_THREAD (*this, &ARDOUR_UI::record_state_changed);
|
||||
|
||||
if (!_session || !big_clock_window) {
|
||||
if (!_session) {
|
||||
/* why bother - the clock isn't visible */
|
||||
return;
|
||||
}
|
||||
|
||||
if (_session->record_status () == Session::Recording && _session->have_rec_enabled_track ()) {
|
||||
big_clock->set_active (true);
|
||||
} else {
|
||||
big_clock->set_active (false);
|
||||
ActionManager::set_sensitive (ActionManager::rec_sensitive_actions, !_session->actively_recording());
|
||||
|
||||
if (big_clock_window) {
|
||||
if (_session->record_status () == Session::Recording && _session->have_rec_enabled_track ()) {
|
||||
big_clock->set_active (true);
|
||||
} else {
|
||||
big_clock->set_active (false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -159,6 +159,7 @@ ARDOUR_UI::install_actions ()
|
||||
act = global_actions.register_action (main_actions, X_("AddTrackBus"), _("Add Track or Bus..."), sigc::mem_fun(*this, &ARDOUR_UI::add_route));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
ActionManager::rec_sensitive_actions.push_back (act);
|
||||
|
||||
act = global_actions.register_action (main_actions, X_("duplicate-routes"), _("Duplicate Tracks/Busses..."),
|
||||
sigc::mem_fun(*this, &ARDOUR_UI::start_duplicate_routes));
|
||||
|
Loading…
Reference in New Issue
Block a user