Don't miss frame separators.

This commit is contained in:
Bartosz Taudul 2018-10-05 20:59:00 +02:00
parent 81cf024498
commit 0d8b79f6c9

View File

@ -1293,6 +1293,7 @@ bool View::DrawZoneFrames( const FrameData& frames )
int64_t prev = -1;
int64_t prevEnd = -1;
int64_t endPos = -1;
bool tooltipDisplayed = false;
for( int i = zrange.first; i < zrange.second; i++ )
@ -1356,14 +1357,15 @@ bool View::DrawZoneFrames( const FrameData& frames )
if( m_frames == &frames )
{
if( fbegin >= m_zvStart )
if( fbegin >= m_zvStart && endPos != fbegin )
{
draw->AddLine( wpos + ImVec2( ( fbegin - m_zvStart ) * pxns, 0 ), wpos + ImVec2( ( fbegin - m_zvStart ) * pxns, wh ), 0x22FFFFFF );
}
if( !frames.continuous && fend <= m_zvEnd )
if( fend <= m_zvEnd )
{
draw->AddLine( wpos + ImVec2( ( fend - m_zvStart ) * pxns, 0 ), wpos + ImVec2( ( fend - m_zvStart ) * pxns, wh ), 0x22FFFFFF );
}
endPos = fend;
}
auto buf = GetFrameText( frames, i, ftime, m_worker.GetFrameOffset() );
@ -1403,12 +1405,6 @@ bool View::DrawZoneFrames( const FrameData& frames )
prev = -1;
}
const auto fend = m_worker.GetFrameEnd( frames, zrange.second-1 );
if( fend == m_zvEnd )
{
draw->AddLine( wpos + ImVec2( ( fend - m_zvStart ) * pxns, 0 ), wpos + ImVec2( ( fend - m_zvStart ) * pxns, wh ), 0x22FFFFFF );
}
if( hover && !tooltipDisplayed )
{
ImGui::BeginTooltip();