diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-05-05 12:31:21 +0100 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-05-05 18:56:25 +0100 |
commit | 0c035778e162bd5934fc0070e43a26ffb4c8825a (patch) | |
tree | 0fa5ae935d4d5effc9e3ae372d8b2905f1578110 /libs/ardour/session_state.cc | |
parent | ccd19ed0615bfb300bedc23ac48de7f426a7948e (diff) |
libardour now has CoreSelection object to manage selection status of Stripables and AutomationControls
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 581d6950c5..b7fac84ffe 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -114,6 +114,7 @@ #include "ardour/revision.h" #include "ardour/route_group.h" #include "ardour/send.h" +#include "ardour/selection.h" #include "ardour/session.h" #include "ardour/session_directory.h" #include "ardour/session_metadata.h" @@ -1286,6 +1287,8 @@ Session::state (bool full_state) if (full_state) { + node->add_child_nocopy (_selection->get_state()); + if (_locations) { node->add_child_nocopy (_locations->get_state()); } @@ -1649,6 +1652,10 @@ Session::set_state (const XMLNode& node, int version) } } + if ((child = find_named_node (node, X_("Selection")))) { + _selection->set_state (*child, version); + } + update_route_record_state (); /* here beginneth the second phase ... */ @@ -3583,6 +3590,12 @@ Session::controllable_by_id (const PBD::ID& id) return boost::shared_ptr<Controllable>(); } +boost::shared_ptr<AutomationControl> +Session::automation_control_by_id (const PBD::ID& id) +{ + return boost::dynamic_pointer_cast<AutomationControl> (controllable_by_id (id)); +} + boost::shared_ptr<Controllable> Session::controllable_by_descriptor (const ControllableDescriptor& desc) { |