From ed291ee8d0b9a0d8fff44a8a37ea7b099c768e60 Mon Sep 17 00:00:00 2001 From: nikolay Date: Fri, 19 Sep 2014 16:45:01 +0300 Subject: [PATCH] [Summary] Changed function name update_route_active_state() on update_route_record_state() [Reviewed] GZharun Conflicts: libs/ardour/ardour/session.h libs/ardour/session.cc libs/ardour/session_state.cc --- libs/ardour/ardour/session.h | 4 ++-- libs/ardour/session.cc | 11 ++++++++--- libs/ardour/session_state.cc | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index bdb3c3f792..2a90230c73 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -1677,9 +1677,9 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop mutable bool have_looped; ///< Used in ::audible_frame(*) - void update_have_rec_enabled_track (); + void update_route_record_state (); gint _have_rec_enabled_track; - gint _have_rec_disabled_track; + gint _have_rec_disabled_track; static int ask_about_playlist_deletion (boost::shared_ptr); diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index dc00ecd893..94153de1cf 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -2709,6 +2709,8 @@ Session::add_routes (RouteList& new_routes, bool input_auto_connect, bool output reassign_track_numbers(); + update_route_record_state (); + RouteAdded (new_routes); /* EMIT SIGNAL */ } @@ -2766,7 +2768,7 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool if (tr) { tr->PlaylistChanged.connect_same_thread (*this, boost::bind (&Session::track_playlist_changed, this, boost::weak_ptr (tr))); track_playlist_changed (boost::weak_ptr (tr)); - tr->RecordEnableChanged.connect_same_thread (*this, boost::bind (&Session::update_have_rec_enabled_track, this)); + tr->RecordEnableChanged.connect_same_thread (*this, boost::bind (&Session::update_route_record_state, this)); boost::shared_ptr mt = boost::dynamic_pointer_cast (tr); if (mt) { @@ -2994,6 +2996,8 @@ Session::remove_route (boost::shared_ptr route) save_history (_current_snapshot_name); } reassign_track_numbers(); + + update_route_record_state (); } void @@ -4986,7 +4990,7 @@ Session::have_rec_disabled_track () const /** Update the state of our rec-enabled tracks flag */ void -Session::update_have_rec_enabled_track () +Session::update_route_record_state () { boost::shared_ptr rl = routes.reader (); RouteList::iterator i = rl->begin(); @@ -5063,7 +5067,8 @@ Session::route_added_to_route_group (RouteGroup* rg, boost::weak_ptr r) void Session::route_removed_from_route_group (RouteGroup* rg, boost::weak_ptr r) { - RouteRemovedFromRouteGroup (rg, r); + update_route_record_state (); + RouteRemovedFromRouteGroup (rg, r); /* EMIT SIGNAL */ } boost::shared_ptr diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 4810e6935b..a124f4fc12 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1350,7 +1350,7 @@ Session::set_state (const XMLNode& node, int version) ControlProtocolManager::instance().set_state (*child, version); } - update_have_rec_enabled_track (); + update_route_record_state (); /* here beginneth the second phase ... */ -- 2.30.2