From 751692eedda156909d50f75aafaf2c423474fd9c Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 23 Sep 2020 15:59:34 +0200 Subject: [PATCH] Don't track latest trace events if there's no connection. --- server/TracyView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 4aa15726..cd65bfd1 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1615,7 +1615,7 @@ void View::DrawFrames() if( IsMouseClickReleased( 1 ) ) m_setRangePopup = RangeSlim { m_worker.GetFrameBegin( *m_frames, sel ), m_worker.GetFrameEnd( *m_frames, sel + group - 1 ), true }; } - if( m_viewMode == ViewMode::Paused && wheel != 0 ) + if( ( !m_worker.IsConnected() || m_viewMode == ViewMode::Paused ) && wheel != 0 ) { const int pfwidth = GetFrameWidth( prevScale ); const int pgroup = GetFrameGroup( prevScale ); @@ -2028,7 +2028,7 @@ void View::HandleZoneViewMouse( int64_t timespan, const ImVec2& wpos, float w, d t0 -= std::max( int64_t( 1 ), int64_t( p1 * 0.25 ) ); t1 += std::max( int64_t( 1 ), int64_t( p2 * 0.25 ) ); } - ZoomToRange( t0, t1, m_viewMode == ViewMode::Paused ); + ZoomToRange( t0, t1, !m_worker.IsConnected() || m_viewMode == ViewMode::Paused ); } }