From 67be98a3b0167d3922a40bddf3be3726fe003413 Mon Sep 17 00:00:00 2001 From: Dmitry Vedenko Date: Fri, 10 Nov 2023 14:05:32 +0300 Subject: [PATCH] Fixes the blinking play region after it was cleared --- src/AdornedRulerPanel.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/AdornedRulerPanel.cpp b/src/AdornedRulerPanel.cpp index 3e2c06745d06..3e331989e805 100644 --- a/src/AdornedRulerPanel.cpp +++ b/src/AdornedRulerPanel.cpp @@ -2574,12 +2574,13 @@ void AdornedRulerPanel::DoDrawPlayRegion( wxDC * dc, const wxRect &rectP, const wxRect &rectL, const wxRect &rectR) { const auto &viewInfo = ViewInfo::Get(*mProject); - const auto &playRegion = viewInfo.playRegion; - if (playRegion.IsLastActiveRegionClear()) - return; + const auto& playRegion = viewInfo.playRegion; const bool isActive = (mLastPlayRegionActive = playRegion.Active()); + if (playRegion.IsLastActiveRegionClear()) + return; + // Paint the selected region bolder if independently varying, else dim const auto color = TimelineLoopRegionColor(isActive); dc->SetBrush( wxBrush( theTheme.Colour( color )) );