diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 751f874c..bd876c18 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -8294,7 +8294,6 @@ void View::DrawFindZone() const auto numBins = int64_t( w - 4 ); if( numBins > 1 ) { - int64_t selectionTime = 0; const auto s = std::min( m_findZone.highlight.start, m_findZone.highlight.end ); const auto e = std::max( m_findZone.highlight.start, m_findZone.highlight.end ); @@ -8382,6 +8381,8 @@ void View::DrawFindZone() memset( binTime.get(), 0, sizeof( int64_t ) * numBins ); memset( selBin.get(), 0, sizeof( int64_t ) * numBins ); + int64_t selectionTime = 0; + if( m_findZone.logTime ) { const auto tMinLog = log10( tmin ); @@ -8473,6 +8474,8 @@ void View::DrawFindZone() } } } + + m_findZone.selTime = selectionTime; } int64_t maxVal; @@ -8542,7 +8545,7 @@ void View::DrawFindZone() DrawHelpMarker( "Left draw on histogram to select range. Right click to clear selection." ); if( m_findZone.highlight.active ) { - TextFocused( "Selection time:", TimeToString( selectionTime ) ); + TextFocused( "Selection time:", TimeToString( m_findZone.selTime ) ); } else { diff --git a/server/TracyView.hpp b/server/TracyView.hpp index f74f0d92..da198341 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -435,6 +435,7 @@ private: float average, selAverage; float median, selMedian; int64_t total, selTotal; + int64_t selTime; bool drawAvgMed = true; bool drawSelAvgMed = true; bool scheduleResetMatch = false; @@ -487,6 +488,7 @@ private: selAverage = 0; selMedian = 0; selTotal = 0; + selTime = 0; binCache.numBins = -1; }