diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 40479ad6..17a4d85b 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -228,6 +228,7 @@ View::View( const char* addr ) , m_zoneSrcLocHighlight( 0 ) , m_lockHighlight { -1 } , m_msgHighlight( nullptr ) + , m_msgToFocus( nullptr ) , m_gpuInfoWindow( nullptr ) , m_callstackInfoWindow( 0 ) , m_memoryAllocInfoWindow( -1 ) @@ -269,6 +270,7 @@ View::View( FileRead& f ) , m_zoneInfoWindow( nullptr ) , m_zoneSrcLocHighlight( 0 ) , m_msgHighlight( nullptr ) + , m_msgToFocus( nullptr ) , m_gpuInfoWindow( nullptr ) , m_callstackInfoWindow( 0 ) , m_memoryAllocInfoWindow( -1 ) @@ -1378,6 +1380,11 @@ void View::DrawZones() ImGui::EndTooltip(); m_msgHighlight = *it; + if( ImGui::IsMouseClicked( 0 ) ) + { + m_showMessages = true; + m_msgToFocus = *it; + } if( ImGui::IsMouseClicked( 2 ) ) { CenterAtTime( (*it)->time ); @@ -3936,6 +3943,11 @@ void View::DrawMessages() { m_msgHighlight = v; } + if( m_msgToFocus == v ) + { + ImGui::SetScrollHere(); + m_msgToFocus = nullptr; + } ImGui::PopID(); ImGui::NextColumn(); ImGui::Text( "%s", m_worker.GetThreadString( v->thread ) ); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 951bbebc..24ad3b7e 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -189,6 +189,7 @@ private: DecayValue m_zoneSrcLocHighlight; LockHighlight m_lockHighlight; DecayValue m_msgHighlight; + const MessageData* m_msgToFocus; const GpuEvent* m_gpuInfoWindow; const GpuEvent* m_gpuHighlight; uint64_t m_gpuInfoWindowThread;