diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-08-01 12:02:30 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-08-01 12:02:30 -0400 |
commit | 480e0b2a5f9f3ced1c0dee6b0a6b178e35f9e89a (patch) | |
tree | 3be086e50e734d922ef2f7204504c02dcc7fc0d8 /libs | |
parent | e16866416738a3b2089e760fb76d45ff7a59fe3a (diff) |
make Session::get_remote_nth_stripable() ignore hidden stripables unless asked.
this more closely matches the semantics of ye olde get_*_by_rid() from ardour 4.x and earlier
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/session.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 99efc1cb72..61bfce14b6 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -4244,6 +4244,24 @@ Session::get_remote_nth_stripable (PresentationInfo::order_t n, PresentationInfo sl.sort (Stripable::PresentationOrderSorter()); for (StripableList::const_iterator s = sl.begin(); s != sl.end(); ++s) { + + if ((*s)->presentation_info().hidden()) { + /* if the caller didn't explicitly ask for hidden + stripables, ignore hidden ones. This matches + the semantics of the pre-PresentationOrder + "get by RID" logic of Ardour 4.x and earlier. + + XXX at some point we should likely reverse + the logic of the flags, because asking for "the + hidden stripables" is not going to be common, + whereas asking for visible ones is normal. + */ + + if (! (flags & PresentationInfo::Hidden)) { + continue; + } + } + if ((*s)->presentation_info().flag_match (flags)) { if (match_cnt++ == n) { return *s; |