Left click on message marker displays it on the msg list.

This commit is contained in:
Bartosz Taudul 2018-08-05 16:57:21 +02:00
parent 1d6f388a81
commit 2a08687afe
2 changed files with 13 additions and 0 deletions

View File

@ -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 ) );

View File

@ -189,6 +189,7 @@ private:
DecayValue<uint64_t> m_zoneSrcLocHighlight;
LockHighlight m_lockHighlight;
DecayValue<const MessageData*> m_msgHighlight;
const MessageData* m_msgToFocus;
const GpuEvent* m_gpuInfoWindow;
const GpuEvent* m_gpuHighlight;
uint64_t m_gpuInfoWindowThread;