From 310203101f080c50a301c6b73d5e3172ea86c8a9 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 29 Jul 2018 20:17:35 +0200 Subject: [PATCH] Stop zoom-range-selection when zooming to range. This also disables zoom range selection when middle click is used to zoom view to a selected zone. --- server/TracyView.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 31fd6805..2d772f38 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -774,9 +774,9 @@ void View::HandleZoneViewMouse( int64_t timespan, const ImVec2& wpos, float w, d } else if( m_highlightZoom.active ) { - m_highlightZoom.active = false; const auto s = std::min( m_highlightZoom.start, m_highlightZoom.end ); const auto e = std::max( m_highlightZoom.start, m_highlightZoom.end ); + // ZoomToRange disables m_highlightZoom.active ZoomToRange( s, e ); } @@ -6076,6 +6076,7 @@ void View::ZoomToZone( const GpuEvent& ev ) void View::ZoomToRange( int64_t start, int64_t end ) { m_pause = true; + m_highlightZoom.active = false; m_zoomAnim.active = true; m_zoomAnim.start0 = m_zvStart; m_zoomAnim.start1 = start;