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:
parent
e41deb1ff6
commit
2711af39e5
@ -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 ) )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user