From 11a702149ea2e4a7bc858a2aeb4ea8efe12502ba Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 16 Mar 2015 13:00:09 -0500 Subject: [PATCH] avoid possible shared remote control IDs in large (>317 track) session --- gtk2_ardour/editor_routes.cc | 11 ++++++++++- gtk2_ardour/mixer_ui.cc | 11 +++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/editor_routes.cc b/gtk2_ardour/editor_routes.cc index 761212d9a2..72c7fcf0ff 100644 --- a/gtk2_ardour/editor_routes.cc +++ b/gtk2_ardour/editor_routes.cc @@ -871,10 +871,19 @@ EditorRoutes::reset_remote_control_ids () for (ri = rows.begin(); ri != rows.end(); ++ri) { + /* skip two special values */ + + if (rid == Route::MasterBusRemoteControlID) { + rid++; + } + + if (rid == Route::MonitorBusRemoteControlID) { + rid++; + } + boost::shared_ptr route = (*ri)[_columns.route]; bool visible = (*ri)[_columns.visible]; - if (!route->is_master() && !route->is_monitor()) { uint32_t new_rid = (visible ? rid : invisible_key--); diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 85e68da880..88e6b4bcb9 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -473,6 +473,17 @@ Mixer_UI::reset_remote_control_ids () uint32_t invisible_key = UINT32_MAX; for (ri = rows.begin(); ri != rows.end(); ++ri) { + + /* skip two special values */ + + if (rid == Route::MasterBusRemoteControlID) { + rid++; + } + + if (rid == Route::MonitorBusRemoteControlID) { + rid++; + } + boost::shared_ptr route = (*ri)[track_columns.route]; bool visible = (*ri)[track_columns.visible];