mirror of
https://github.com/wolfpld/tracy.git
synced 2026-11-19 22:25:59 +00:00
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:
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user