mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-18 20:56:28 +01:00
Add method to ensure Stripable sort constrains (for UI use)
This commit is contained in:
parent
10db824461
commit
140c511d2c
2 changed files with 27 additions and 0 deletions
|
|
@ -873,6 +873,9 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
||||||
boost::shared_ptr<Route> monitor_out() const { return _monitor_out; }
|
boost::shared_ptr<Route> monitor_out() const { return _monitor_out; }
|
||||||
boost::shared_ptr<Route> master_out() const { return _master_out; }
|
boost::shared_ptr<Route> master_out() const { return _master_out; }
|
||||||
|
|
||||||
|
PresentationInfo::order_t master_order_key () const { return _master_out ? _master_out->presentation_info ().order () : -1; }
|
||||||
|
bool ensure_stripable_sort_order ();
|
||||||
|
|
||||||
void globally_add_internal_sends (boost::shared_ptr<Route> dest, Placement p, bool);
|
void globally_add_internal_sends (boost::shared_ptr<Route> dest, Placement p, bool);
|
||||||
void globally_set_send_gains_from_track (boost::shared_ptr<Route> dest);
|
void globally_set_send_gains_from_track (boost::shared_ptr<Route> dest);
|
||||||
void globally_set_send_gains_to_zero (boost::shared_ptr<Route> dest);
|
void globally_set_send_gains_to_zero (boost::shared_ptr<Route> dest);
|
||||||
|
|
|
||||||
|
|
@ -3037,6 +3037,30 @@ Session::reconnect_mmc_ports(bool inputs)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool
|
||||||
|
Session::ensure_stripable_sort_order ()
|
||||||
|
{
|
||||||
|
StripableList sl;
|
||||||
|
get_stripables (sl);
|
||||||
|
sl.sort (Stripable::Sorter ());
|
||||||
|
|
||||||
|
bool change = false;
|
||||||
|
PresentationInfo::order_t order = 0;
|
||||||
|
|
||||||
|
for (StripableList::iterator si = sl.begin(); si != sl.end(); ++si) {
|
||||||
|
boost::shared_ptr<Stripable> s (*si);
|
||||||
|
if (s->is_monitor () || s->is_auditioner ()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (order != s->presentation_info().order()) {
|
||||||
|
s->set_presentation_order (order);
|
||||||
|
change = true;
|
||||||
|
}
|
||||||
|
++order;
|
||||||
|
}
|
||||||
|
return change;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Session::ensure_route_presentation_info_gap (PresentationInfo::order_t first_new_order, uint32_t how_many)
|
Session::ensure_route_presentation_info_gap (PresentationInfo::order_t first_new_order, uint32_t how_many)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue