From 36b2b8f71fd4aaf7c0dfb163f3bbccbbd947fd53 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 16 Sep 2019 20:31:32 +0200 Subject: [PATCH] Always return static thread color if dynamic colors are disabled. --- server/TracyView.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 04976376..6a049d7b 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11908,6 +11908,8 @@ uint32_t View::GetZoneColor( const ZoneEvent& ev, uint64_t thread, int depth ) uint32_t View::GetThreadColor( uint64_t thread, int depth ) { + if( !m_vd.dynamicColors ) return 0xFFCC5555; + const uint8_t h = thread & 0xFF; const uint8_t s = 96; const uint8_t v = std::max( 96, 170 - depth * 8 ); @@ -11939,7 +11941,6 @@ uint32_t View::GetRawZoneColor( const ZoneEvent& ev, uint64_t thread, int depth const auto& srcloc = m_worker.GetSourceLocation( ev.SrcLoc() ); const auto color = srcloc.color; if( color != 0 ) return color | 0xFF000000; - if( !m_vd.dynamicColors ) return 0xFFCC5555; return GetThreadColor( thread, depth ); }