From 4ca4c85976c605b840a2ab044106644a774860b7 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 6 Oct 2018 12:52:05 +0200 Subject: [PATCH] Fix an edge case in zone drawing. If the last zone on a track was not ended, and in the view's past (beyond the left edge of the view) it was still included in calculation of track height. --- server/TracyView.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index c8e5235d..03b7f0f8 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1864,6 +1864,7 @@ int View::DrawZoneLevel( const Vector& vec, bool hover, double pxns, const auto zitend = std::lower_bound( it, vec.end(), m_zvEnd + resolution, [] ( const auto& l, const auto& r ) { return l->start < r; } ); if( it == zitend ) return depth; + if( (*it)->end < 0 && m_worker.GetZoneEnd( **it ) < m_zvStart ) return depth; const auto w = ImGui::GetWindowContentRegionWidth() - 1; const auto ty = ImGui::GetFontSize();