From 6956aed769ed5953e36e171a0649667db9e94297 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 6 Jun 2018 23:36:21 +0200 Subject: [PATCH] Fix selecting last bin with log time in find zone. --- server/TracyView.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index a7291038..ab33499e 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -3808,7 +3808,17 @@ void View::DrawFindZone() if( m_findZone.logTime ) { t0 = int64_t( pow( 10, ltmin + bin / numBins * ( ltmax - ltmin ) ) ); - t1 = int64_t( pow( 10, ltmin + (bin+1) / numBins * ( ltmax - ltmin ) ) ); + + // Hackfix for inability to select data in last bin. + // A proper solution would be nice. + if( bin+1 == numBins ) + { + t1 = tmax; + } + else + { + t1 = int64_t( pow( 10, ltmin + (bin+1) / numBins * ( ltmax - ltmin ) ) ); + } } else {