1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Fix selecting last bin with log time in find zone.

This commit is contained in:
Bartosz Taudul 2018-06-06 23:36:21 +02:00
parent b4ce0c281b
commit 6956aed769

View File

@ -3808,8 +3808,18 @@ void View::DrawFindZone()
if( m_findZone.logTime ) if( m_findZone.logTime )
{ {
t0 = int64_t( pow( 10, ltmin + bin / numBins * ( ltmax - ltmin ) ) ); t0 = int64_t( pow( 10, ltmin + bin / 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 ) ) ); t1 = int64_t( pow( 10, ltmin + (bin+1) / numBins * ( ltmax - ltmin ) ) );
} }
}
else else
{ {
t0 = int64_t( tmin + bin / numBins * ( tmax - tmin ) ); t0 = int64_t( tmin + bin / numBins * ( tmax - tmin ) );