diff --git a/server/TracyView.cpp b/server/TracyView.cpp index d07ff93a..c4b30336 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -2389,6 +2389,8 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos, { n = GetNextLockEvent( n, vend, ns, ns, thread ); } + drawState = CombineLockState( drawState, nextState ); + condensed++; const auto t2 = n == tl.end() ? GetLastTime() : (*n)->time; const auto px2 = ( t2 - m_zvStart ) * pxns; if( px2 - px1 > MinVisSize ) break; @@ -2398,8 +2400,6 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos, px1 = px2; next = n; nextState = ns; - condensed++; - drawState = CombineLockState( drawState, nextState ); } bool itemHovered = hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( std::max( px0, -10.0 ), offset ), wpos + ImVec2( std::min( std::max( px1, px0+MinVisSize ), double( w + 10 ) ), offset + ty ) );