From b7bd3696b7eeef687d0c08fd9340322c45905e6f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 10 Feb 2019 16:04:04 +0100 Subject: [PATCH] Do not draw time subdividers on a nanosecond scale. --- server/TracyView.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 573b5aec..884b8a16 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1433,14 +1433,17 @@ bool View::DrawZoneFramesHeader() tw = ImGui::CalcTextSize( txt ).x; } - for( int i=1; i<5; i++ ) + if( scale != 0 ) { - draw->AddLine( wpos + ImVec2( x + i * dx / 10, 0 ), wpos + ImVec2( x + i * dx / 10, round( ty * 0.25 ) ), 0x33FFFFFF ); - } - draw->AddLine( wpos + ImVec2( x + 5 * dx / 10, 0 ), wpos + ImVec2( x + 5 * dx / 10, round( ty * 0.375 ) ), 0x33FFFFFF ); - for( int i=6; i<10; i++ ) - { - draw->AddLine( wpos + ImVec2( x + i * dx / 10, 0 ), wpos + ImVec2( x + i * dx / 10, round( ty * 0.25 ) ), 0x33FFFFFF ); + for( int i=1; i<5; i++ ) + { + draw->AddLine( wpos + ImVec2( x + i * dx / 10, 0 ), wpos + ImVec2( x + i * dx / 10, round( ty * 0.25 ) ), 0x33FFFFFF ); + } + draw->AddLine( wpos + ImVec2( x + 5 * dx / 10, 0 ), wpos + ImVec2( x + 5 * dx / 10, round( ty * 0.375 ) ), 0x33FFFFFF ); + for( int i=6; i<10; i++ ) + { + draw->AddLine( wpos + ImVec2( x + i * dx / 10, 0 ), wpos + ImVec2( x + i * dx / 10, round( ty * 0.25 ) ), 0x33FFFFFF ); + } } x += dx;