13
0

fix crash when trying to create a non-template track/bus with >2 channels; put MIDI after mono/stereo in the track config combo of AddRouteDialog

git-svn-id: svn://localhost/ardour2/branches/3.0@5406 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2009-07-21 18:29:34 +00:00
parent b65f8073ba
commit 965ffc3950

View File

@ -259,7 +259,7 @@ string
AddRouteDialog::track_template ()
{
string str = channel_combo.get_active_text();
for (ChannelSetups::iterator i = channel_setups.begin(); i != channel_setups.end(); ++i) {
if (str == (*i).name) {
return (*i).template_path;
@ -287,13 +287,6 @@ AddRouteDialog::refill_channel_setups ()
channel_combo_strings.clear ();
channel_setups.clear ();
chn.name = X_("MIDI");
chn.channels = 0;
channel_setups.push_back (chn);
chn.name = "separator";
channel_setups.push_back (chn);
chn.name = _("Mono");
chn.channels = 1;
channel_setups.push_back (chn);
@ -302,6 +295,16 @@ AddRouteDialog::refill_channel_setups ()
chn.channels = 2;
channel_setups.push_back (chn);
chn.name = "separator";
channel_setups.push_back (chn);
chn.name = X_("MIDI");
chn.channels = 0;
channel_setups.push_back (chn);
chn.name = "separator";
channel_setups.push_back (chn);
ARDOUR::find_route_templates (route_templates);
if (!ARDOUR::Profile->get_sae()) {
@ -315,6 +318,10 @@ AddRouteDialog::refill_channel_setups ()
}
}
/* clear template path for the rest */
chn.template_path = "";
chn.name = _("3 Channel");
chn.channels = 3;
channel_setups.push_back (chn);