13
0

Add new routes to selection in the editor, rather than the editor

route list.
Fixes new tracks not being selected.
Also begin selection op history when adding routes.
This commit is contained in:
nick_m 2015-03-13 02:47:16 +11:00
parent b622bc18fc
commit 9ec393422f
2 changed files with 8 additions and 4 deletions

View File

@ -5220,6 +5220,8 @@ Editor::add_routes (RouteList& routes)
RouteTimeAxisView *rtv;
list<RouteTimeAxisView*> new_views;
TrackViewList new_selection;
bool from_scratch = (track_views.size() == 0);
for (RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
boost::shared_ptr<Route> route = (*x);
@ -5242,6 +5244,7 @@ Editor::add_routes (RouteList& routes)
new_views.push_back (rtv);
track_views.push_back (rtv);
new_selection.push_back (rtv);
rtv->effective_gain_display ();
@ -5254,6 +5257,11 @@ Editor::add_routes (RouteList& routes)
_summary->routes_added (new_views);
}
if (!from_scratch) {
selection->add (new_selection);
begin_selection_op_history();
}
if (show_editor_mixer_when_tracks_arrive) {
show_editor_mixer (true);
}

View File

@ -685,10 +685,6 @@ EditorRoutes::routes_added (list<RouteTimeAxisView*> routes)
row[_columns.solo_safe_state] = (*x)->route()->solo_safe();
row[_columns.name_editable] = true;
if (!from_scratch) {
_editor->selection->add(*x);
}
boost::weak_ptr<Route> wr ((*x)->route());
(*x)->route()->gui_changed.connect (*this, MISSING_INVALIDATOR, boost::bind (&EditorRoutes::handle_gui_changes, this, _1, _2), gui_context());