diff --git a/server/TracyView_FrameTimeline.cpp b/server/TracyView_FrameTimeline.cpp index 59ade44a..437a5f18 100644 --- a/server/TracyView_FrameTimeline.cpp +++ b/server/TracyView_FrameTimeline.cpp @@ -93,6 +93,10 @@ void View::DrawTimelineFramesHeader() void View::DrawTimelineFrames( const FrameData& frames ) { + const std::pair 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 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;