Add source preview to statistics window.

This commit is contained in:
Bartosz Taudul 2021-03-27 14:02:52 +01:00
parent 62ac5544b6
commit ff6ecef5f3
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -12492,6 +12492,9 @@ void View::DrawStatistics()
const auto file = m_worker.GetString( srcloc.file );
ImGui::TextDisabled( "%s:%i", file, srcloc.line );
if( ImGui::IsItemHovered() )
{
DrawSourceTooltip( file, srcloc.line );
if( ImGui::IsItemClicked( 1 ) )
{
if( SourceFileValid( file, m_worker.GetCaptureTime(), *this, m_worker ) )
@ -12503,6 +12506,7 @@ void View::DrawStatistics()
m_statBuzzAnim.Enable( v.srcloc, 0.5f );
}
}
}
if( indentVal != 0.f )
{
ImGui::Unindent( indentVal );
@ -12934,6 +12938,9 @@ void View::DrawStatistics()
{
TextDisabledUnformatted( file );
}
if( ImGui::IsItemHovered() )
{
DrawSourceTooltip( file, line );
if( ImGui::IsItemClicked( 1 ) )
{
if( SourceFileValid( file, m_worker.GetCaptureTime(), *this, m_worker ) )
@ -12959,6 +12966,7 @@ void View::DrawStatistics()
m_statBuzzAnim.Enable( v.symAddr, 0.5f );
}
}
}
if( indentVal != 0.f )
{
ImGui::Unindent( indentVal );
@ -13107,6 +13115,9 @@ void View::DrawStatistics()
{
TextDisabledUnformatted( file );
}
if( ImGui::IsItemHovered() )
{
DrawSourceTooltip( file, line );
if( ImGui::IsItemClicked( 1 ) )
{
if( SourceFileValid( file, m_worker.GetCaptureTime(), *this, m_worker ) )
@ -13132,6 +13143,7 @@ void View::DrawStatistics()
m_statBuzzAnim.Enable( iv.symAddr, 0.5f );
}
}
}
if( indentVal != 0.f )
{
ImGui::Unindent( indentVal );