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.cc | |
parent | ccd19ed0615bfb300bedc23ac48de7f426a7948e (diff) |
libardour now has CoreSelection object to manage selection status of Stripables and AutomationControls
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 4ffb58566e..3cf24ba581 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -94,6 +94,7 @@ #include "ardour/route_graph.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_playlists.h" @@ -324,6 +325,7 @@ Session::Session (AudioEngine &eng, , _midi_ports (0) , _mmc (0) , _vca_manager (new VCAManager (*this)) + , _selection (new CoreSelection (*this)) { uint32_t sr = 0; @@ -4388,6 +4390,22 @@ Session::route_by_id (PBD::ID id) const return boost::shared_ptr<Route> ((Route*) 0); } + +boost::shared_ptr<Stripable> +Session::stripable_by_id (PBD::ID id) const +{ + StripableList sl; + get_stripables (sl); + + for (StripableList::const_iterator s = sl.begin(); s != sl.end(); ++s) { + if ((*s)->id() == id) { + return *s; + } + } + + return boost::shared_ptr<Stripable>(); +} + boost::shared_ptr<Processor> Session::processor_by_id (PBD::ID id) const { @@ -4487,7 +4505,7 @@ Session::route_by_selected_count (uint32_t id) const RouteList::iterator i; for (i = r.begin(); i != r.end(); ++i) { - if ((*i)->presentation_info().selected()) { + if ((*i)->is_selected()) { if (id == 0) { return *i; } |