From 925501c851661d612bbc1b0f0b545c9fc8897213 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 25 May 2016 13:53:21 +0200 Subject: [PATCH] don't clear export-channel selection when switching presets --- gtk2_ardour/export_channel_selector.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gtk2_ardour/export_channel_selector.cc b/gtk2_ardour/export_channel_selector.cc index 939fbee950..baef41e1ae 100644 --- a/gtk2_ardour/export_channel_selector.cc +++ b/gtk2_ardour/export_channel_selector.cc @@ -104,6 +104,11 @@ PortExportChannelSelector::sync_with_manager () split_checkbox.set_active (state->config->get_split()); channels_spinbutton.set_value (state->config->get_n_chans()); + /* when loading presets, config is ready set here (shared ptr) + * fill_route_list () -> update_channel_count () -> set_channel_count () -> update_config() + * will call config->clear_channels(); and clear the config + */ + channel_view.set_config (0); fill_route_list (); channel_view.set_config (state->config); } @@ -217,6 +222,7 @@ PortExportChannelSelector::ChannelTreeView::set_config (ChannelConfigPtr c) if (config == c) { return; } config = c; + if (!config) { return; } uint32_t i = 1; ExportChannelConfiguration::ChannelList chan_list = config->get_channels();