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.
This commit is contained in:
Clément Grégoire
2026-11-10 17:45:56 +01:00
parent 6dbc87ffc4
commit 5aa31f077c
+3 -2
View File
@@ -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 );
}