void
Editor::show_editor_mixer (bool yn)
{
+ boost::shared_ptr<ARDOUR::Route> r;
+
show_editor_mixer_when_tracks_arrive = false;
if (!session) {
if (yn) {
- if (current_mixer_strip == 0) {
-
- current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(),
- *session,
- false);
- current_mixer_strip->GoingAway.connect (mem_fun(*this, &Editor::cms_deleted));
- }
-
-
if (selection->tracks.empty()) {
if (track_views.empty()) {
show_editor_mixer_when_tracks_arrive = true;
return;
}
-
+
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
AudioTimeAxisView* atv;
if ((atv = dynamic_cast<AudioTimeAxisView*> (*i)) != 0) {
- current_mixer_strip->set_route (atv->route());
+ r = atv->route();
break;
}
}
AudioTimeAxisView* atv;
if ((atv = dynamic_cast<AudioTimeAxisView*> (*i)) != 0) {
- current_mixer_strip->set_route (atv->route());
+ r = atv->route();
break;
}
}
}
+
+ if (r) {
+ if (current_mixer_strip == 0) {
+
+ current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(),
+ *session,
+ false);
+ current_mixer_strip->GoingAway.connect (mem_fun(*this, &Editor::cms_deleted));
+ }
+
+ current_mixer_strip->set_route (r);
+ }
if (current_mixer_strip->get_parent() == 0) {
current_mixer_strip->set_embedded (true);
Editor::set_selected_mixer_strip (TimeAxisView& view)
{
AudioTimeAxisView* at;
+ bool show = false;
if (!session || (at = dynamic_cast<AudioTimeAxisView*>(&view)) == 0) {
return;
return;
}
+ if (current_mixer_strip->get_parent()) {
+ show = true;
+ }
+
} else {
current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(),
}
current_mixer_strip->set_route (at->route());
- show_editor_mixer (true);
+
+ if (show) {
+ show_editor_mixer (true);
+ }
}
double current = 0.0;