From 05c9325018d240072ee4ddc4d6d3a98a81f5dc7d Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 9 Oct 2018 15:54:28 +0200 Subject: [PATCH] Highlight zones selected in the find zone menu. --- server/TracyView.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 03b7f0f8..3fe2f88f 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -7832,9 +7832,16 @@ const char* View::GetPlotName( const PlotData* plot ) const uint32_t View::GetZoneColor( const ZoneEvent& ev ) { - const auto& srcloc = m_worker.GetSourceLocation( ev.srcloc ); - const auto color = srcloc.color; - return color != 0 ? ( color | 0xFF000000 ) : 0xFFCC5555; + if( m_findZone.show && !m_findZone.match.empty() && m_findZone.match[m_findZone.selMatch] == ev.srcloc ) + { + return 0xFF229999; + } + else + { + const auto& srcloc = m_worker.GetSourceLocation( ev.srcloc ); + const auto color = srcloc.color; + return color != 0 ? ( color | 0xFF000000 ) : 0xFFCC5555; + } } uint32_t View::GetZoneColor( const GpuEvent& ev ) @@ -7894,7 +7901,7 @@ uint32_t View::GetZoneHighlight( const GpuEvent& ev ) float View::GetZoneThickness( const ZoneEvent& ev ) { - if( m_zoneInfoWindow == &ev || m_zoneHighlight == &ev ) + if( m_zoneInfoWindow == &ev || m_zoneHighlight == &ev || ( m_findZone.show && !m_findZone.match.empty() && m_findZone.match[m_findZone.selMatch] == ev.srcloc ) ) { return 3.f; }