diff options
author | Bartosz Taudul <wolf@nereid.pl> | 2022-09-08 00:35:27 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf@nereid.pl> | 2022-09-08 00:35:27 +0300 |
commit | 5bd3f3de5fa851ae267f8b0d4099c20411d96640 (patch) | |
tree | 9c858b7c7a89b1fd300bf6e7b4da78153e2a1de0 /server | |
parent | f16c64872b175272f8703b77212f8482519c08a5 (diff) |
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.
Diffstat (limited to 'server')
-rw-r--r-- | server/TracyView_FrameTimeline.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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 <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; |