New Route dialog: add fallback default selection

This fixes an issue with Mixbus. If the default "Create Audio Tracks.."
template/script is not available. Nothing is selected.

Selecting a type/template is required to update various other dialog
fields. eg. "Name" field.

Previously: Create VCA. OK+Close. Re-open dialog. Now the
implicit default was "Audio Track" but the Name-field still showed "VCA".
This commit is contained in:
Robin Gareus 2018-10-30 16:09:22 +01:00
parent 5bd9bf868f
commit 5b2eb6107c
1 changed files with 5 additions and 0 deletions

View File

@ -957,6 +957,11 @@ AddRouteDialog::refill_channel_setups ()
}
}
if (!selected_default && ! trk_template_model->children().empty()) {
TreeModel::Children rows = trk_template_model->children();
trk_template_chooser.get_selection()->select(rows[0]);
}
std::vector<ARDOUR::TemplateInfo> route_templates;
ARDOUR::find_route_templates (route_templates);