mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Don't use space for frame sets that are out of view range.
This becomes problematic at the end of the range, as continuous frames do not have an "end", but rather essentially persist until the last recorded event.
This commit is contained in:
parent
f16c64872b
commit
5bd3f3de5f
@ -93,6 +93,10 @@ void View::DrawTimelineFramesHeader()
|
||||
|
||||
void View::DrawTimelineFrames( const FrameData& frames )
|
||||
{
|
||||
const std::pair <int, int> zrange = m_worker.GetFrameRange( frames, m_vd.zvStart, m_vd.zvEnd );
|
||||
if( zrange.first < 0 ) return;
|
||||
if( m_worker.GetFrameBegin( frames, zrange.first ) > m_vd.zvEnd || m_worker.GetFrameEnd( frames, zrange.second ) < m_vd.zvStart ) return;
|
||||
|
||||
const auto wpos = ImGui::GetCursorScreenPos();
|
||||
const auto dpos = wpos + ImVec2( 0.5f, 0.5f );
|
||||
const auto w = ImGui::GetContentRegionAvail().x - ImGui::GetStyle().ScrollbarSize;
|
||||
@ -110,9 +114,6 @@ void View::DrawTimelineFrames( const FrameData& frames )
|
||||
|
||||
const auto nspx = 1.0 / pxns;
|
||||
|
||||
const std::pair <int, int> zrange = m_worker.GetFrameRange( frames, m_vd.zvStart, m_vd.zvEnd );
|
||||
if( zrange.first < 0 ) return;
|
||||
|
||||
int64_t prev = -1;
|
||||
int64_t prevEnd = -1;
|
||||
int64_t endPos = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user