diff options
-rw-r--r-- | gtk2_ardour/export_channel_selector.cc | 11 | ||||
-rw-r--r-- | gtk2_ardour/export_channel_selector.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/gtk2_ardour/export_channel_selector.cc b/gtk2_ardour/export_channel_selector.cc index 481fe3d64c..d55a223b93 100644 --- a/gtk2_ardour/export_channel_selector.cc +++ b/gtk2_ardour/export_channel_selector.cc @@ -36,6 +36,7 @@ #include "ardour/io.h" #include "ardour/route.h" #include "ardour/session.h" +#include "ardour/selection.h" #include "export_channel_selector.h" #include "route_sorter.h" @@ -700,6 +701,8 @@ TrackExportChannelSelector::fill_list() track_list->clear(); RouteList routes = _session->get_routelist(); + CoreSelection const& cs (_session->selection()); + for (RouteList::iterator it = routes.begin(); it != routes.end(); ++it) { if (!boost::dynamic_pointer_cast<Track>(*it)) { // not a track, must be a bus @@ -712,7 +715,7 @@ TrackExportChannelSelector::fill_list() } // not monitor or master bus - add_track (*it); + add_track (*it, cs.selected (*it)); } } for (RouteList::iterator it = routes.begin(); it != routes.end(); ++it) { @@ -721,18 +724,18 @@ TrackExportChannelSelector::fill_list() // don't include inactive tracks continue; } - add_track (*it); + add_track (*it, cs.selected (*it)); } } } void -TrackExportChannelSelector::add_track (boost::shared_ptr<Route> route) +TrackExportChannelSelector::add_track (boost::shared_ptr<Route> route, bool selected) { Gtk::TreeModel::iterator iter = track_list->append(); Gtk::TreeModel::Row row = *iter; - row[track_cols.selected] = false; + row[track_cols.selected] = selected; row[track_cols.label] = route->name(); row[track_cols.route] = route; row[track_cols.order_key] = route->presentation_info().order(); diff --git a/gtk2_ardour/export_channel_selector.h b/gtk2_ardour/export_channel_selector.h index 68af9817ba..08eab87ebd 100644 --- a/gtk2_ardour/export_channel_selector.h +++ b/gtk2_ardour/export_channel_selector.h @@ -256,7 +256,7 @@ class TrackExportChannelSelector : public ExportChannelSelector private: void fill_list(); - void add_track (boost::shared_ptr<ARDOUR::Route> route); + void add_track (boost::shared_ptr<ARDOUR::Route> route, bool selected); void update_config(); ChannelConfigList configs; |