1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 04:23:51 +00:00

Check if zoom range is valid.

This is important for GPU zones, which may have broken timing data.
This commit is contained in:
Bartosz Taudul 2022-09-04 13:16:26 +02:00
parent e41deb1ff6
commit 2711af39e5
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -91,7 +91,12 @@ void TimelineItem::Draw( bool firstFrame, double pxns, int& offset, const ImVec2
}
if( IsMouseClicked( 2 ) )
{
m_view.ZoomToRange( RangeBegin(), RangeEnd() );
const auto t0 = RangeBegin();
const auto t1 = RangeEnd();
if( t0 < t1 )
{
m_view.ZoomToRange( t0, t1 );
}
}
if( IsMouseClicked( 1 ) )
{