From 5aa31f077c50cca6bd8df9d7ec3561b98263fbd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Gr=C3=A9goire?= Date: Tue, 10 Nov 2026 17:45:56 +0100 Subject: [PATCH] Don't scroll messages to bottom when focusing a message. While connected, the messages list sticks to the bottom when it is already scrolled there, which is always the case for a window that was just opened. This would override the scroll to the message clicked on the timeline. --- profiler/src/profiler/TracyView_Messages.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/profiler/src/profiler/TracyView_Messages.cpp b/profiler/src/profiler/TracyView_Messages.cpp index cf28feb0..670fc207 100644 --- a/profiler/src/profiler/TracyView_Messages.cpp +++ b/profiler/src/profiler/TracyView_Messages.cpp @@ -318,7 +318,8 @@ void View::DrawMessages() ImGui::TableHeadersRow(); int idx = 0; - if( m_msgToFocus ) + const bool focusing = m_msgToFocus != nullptr; + if( focusing ) { for( const auto& msgIdx : m_msgList ) { @@ -339,7 +340,7 @@ void View::DrawMessages() } } - if( m_worker.IsConnected() && ImGui::GetScrollY() >= ImGui::GetScrollMaxY() ) + if( !focusing && m_worker.IsConnected() && ImGui::GetScrollY() >= ImGui::GetScrollMaxY() ) { ImGui::SetScrollHereY( 1.f ); }