From 78037a532c8da7ec9c665f77852b9ebe3ae4c020 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 28 Jun 2023 13:38:27 -0600 Subject: [PATCH] when displaying region selecting, compare regions not regionviews This worked before because nothing happened to AutomationRegionViews when an AudioRegionView or MIDIRegionView was selected, and so testing based on the regionview worked (the potential RV could be the actual RV). But when displaying region selection (in any way) on other TimeAxisViews, the correct test is whether the RegionView shows the same region as the selected region(view). --- gtk2_ardour/streamview.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index 1e42bd00fe..2b634df91c 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -565,7 +565,7 @@ StreamView::set_selected_regionviews (RegionSelection& regions) /* Linear search: probably as good as anything else */ for (RegionSelection::iterator ii = regions.begin(); ii != regions.end(); ++ii) { - if (*i == *ii) { + if ((*i)->region() == (*ii)->region()) { selected = true; break; }