}
void
-Mixer_UI::add_strip (Route* route)
+Mixer_UI::add_strip (boost::shared_ptr<Route> route)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::add_strip), route));
return;
}
- strip = new MixerStrip (*this, *session, *route);
+ strip = new MixerStrip (*this, *session, route);
strips.push_back (strip);
strip->set_width (_strip_width);
Mixer_UI::follow_strip_selection ()
{
for (list<MixerStrip *>::iterator i = strips.begin(); i != strips.end(); ++i) {
- (*i)->set_selected (_selection.selected (&(*i)->route()));
+ (*i)->set_selected (_selection.selected ((*i)->route()));
}
}
at the same time.
*/
- if (_selection.selected (&strip->route())) {
- _selection.remove (&strip->route());
+ if (_selection.selected (strip->route())) {
+ _selection.remove (strip->route());
} else {
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
- _selection.add (&strip->route());
+ _selection.add (strip->route());
} else {
- _selection.set (&strip->route());
+ _selection.set (strip->route());
}
}
}
continue;
}
- if (strip->route().master() || strip->route().control()) {
+ if (strip->route()->master() || strip->route()->control()) {
continue;
}
continue;
}
- if (strip->route().master() || strip->route().control()) {
+ if (strip->route()->master() || strip->route()->control()) {
continue;
}
- AudioTrack* at = dynamic_cast<AudioTrack*> (&strip->route());
+ AudioTrack* at = strip->audio_track();
switch (tracks) {
case 0:
if (visible) {
strip->set_marked_for_display (true);
- strip->route().set_order_key (N_("signal"), order);
+ strip->route()->set_order_key (N_("signal"), order);
if (strip->packed()) {
- if (strip->route().master() || strip->route().control()) {
+ if (strip->route()->master() || strip->route()->control()) {
out_packer.reorder_child (*strip, -1);
} else {
strip_packer.reorder_child (*strip, -1); /* put at end */
} else {
- if (strip->route().master() || strip->route().control()) {
+ if (strip->route()->master() || strip->route()->control()) {
out_packer.pack_start (*strip, false, false);
} else {
strip_packer.pack_start (*strip, false, false);
} else {
- if (strip->route().master() || strip->route().control()) {
+ if (strip->route()->master() || strip->route()->control()) {
/* do nothing, these cannot be hidden */
} else {
strip_packer.remove (*strip);
}
struct SignalOrderRouteSorter {
- bool operator() (Route* a, Route* b) {
+ bool operator() (boost::shared_ptr<Route> a, boost::shared_ptr<Route> b) {
/* use of ">" forces the correct sort order */
return a->order_key ("signal") < b->order_key ("signal");
}
void
Mixer_UI::initial_track_display ()
{
- Session::RouteList routes = session->get_routes();
+ boost::shared_ptr<Session::RouteList> routes = session->get_routes();
+ Session::RouteList copy (*routes);
SignalOrderRouteSorter sorter;
- routes.sort (sorter);
+ copy.sort (sorter);
no_track_list_redisplay = true;
track_model->clear ();
- for (Session::RouteList::iterator i = routes.begin(); i != routes.end(); ++i) {
+ for (Session::RouteList::iterator i = copy.begin(); i != copy.end(); ++i) {
add_strip (*i);
}
MixerStrip* strip = (*iter)[track_columns.strip];
if (strip) {
- if (!strip->route().master() && !strip->route().control()) {
+ if (!strip->route()->master() && !strip->route()->control()) {
bool visible = (*iter)[track_columns.visible];
(*iter)[track_columns.visible] = !visible;
}
for (i = rows.begin(); i != rows.end(); ++i) {
if ((*i)[track_columns.strip] == mx) {
- (*i)[track_columns.text] = mx->route().name();
+ (*i)[track_columns.text] = mx->route()->name();
return;
}
}