From 965ffc3950c70dcf8fda8aa6b64666ee14b61bca Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 21 Jul 2009 18:29:34 +0000 Subject: [PATCH] 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 --- gtk2_ardour/add_route_dialog.cc | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/gtk2_ardour/add_route_dialog.cc b/gtk2_ardour/add_route_dialog.cc index 280918aefc..f165d191c6 100644 --- a/gtk2_ardour/add_route_dialog.cc +++ b/gtk2_ardour/add_route_dialog.cc @@ -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);