Add source code tooltip to function selection list.

This commit is contained in:
Bartosz Taudul 2022-08-15 22:10:59 +02:00
parent 163e7fd490
commit 2031c92f7a
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -1287,6 +1287,18 @@ void SourceView::RenderSymbolView( Worker& worker, View& view )
ImGui::Spacing();
ImGui::SameLine();
ImGui::TextDisabled( "%s:%i", file, line );
if( ImGui::IsItemHovered() && SourceFileValid( file, worker.GetCaptureTime(), view, worker ) )
{
m_sourceTooltip.Parse( file, worker, view );
if( !m_sourceTooltip.empty() )
{
ImGui::BeginTooltip();
SetFont();
PrintSourceFragment( m_sourceTooltip, line, 4, 7 );
UnsetFont();
ImGui::EndTooltip();
}
}
ImGui::NextColumn();
ImGui::TextDisabled( "0x%" PRIx64, v.first );
ImGui::NextColumn();