1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-30 04:43:53 +00:00

Fix drawing last collapsed non-contiguous frame.

This commit is contained in:
Bartosz Taudul 2018-10-21 17:46:24 +02:00
parent 56190c9614
commit 54baec9e7e

View File

@ -1445,8 +1445,17 @@ bool View::DrawZoneFrames( const FrameData& frames )
} }
if( prev != -1 ) if( prev != -1 )
{
if( frames.continuous )
{ {
DrawZigZag( draw, wpos + ImVec2( 0, round( ty / 2 ) ), ( prev - m_zvStart ) * pxns, ( m_worker.GetFrameBegin( frames, zrange.second-1 ) - m_zvStart ) * pxns, ty / 4, inactiveColor ); DrawZigZag( draw, wpos + ImVec2( 0, round( ty / 2 ) ), ( prev - m_zvStart ) * pxns, ( m_worker.GetFrameBegin( frames, zrange.second-1 ) - m_zvStart ) * pxns, ty / 4, inactiveColor );
}
else
{
const auto begin = ( prev - m_zvStart ) * pxns;
const auto end = ( m_worker.GetFrameBegin( frames, zrange.second-1 ) - m_zvStart ) * pxns;
DrawZigZag( draw, wpos + ImVec2( 0, round( ty / 2 ) ), begin, std::max( begin + MinFrameSize, end ), ty / 4, inactiveColor );
}
prev = -1; prev = -1;
} }