1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

Show source preview tooltip in find zones.

This commit is contained in:
Bartosz Taudul 2021-03-27 13:47:20 +01:00
parent 895a63b41a
commit a15ba0c7fb
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -9527,15 +9527,19 @@ void View::DrawFindZone()
} }
const auto fileName = m_worker.GetString( srcloc.file ); const auto fileName = m_worker.GetString( srcloc.file );
ImGui::TextColored( ImVec4( 0.5, 0.5, 0.5, 1 ), "(%s) %s:%i", RealToString( zones.size() ), fileName, srcloc.line ); ImGui::TextColored( ImVec4( 0.5, 0.5, 0.5, 1 ), "(%s) %s:%i", RealToString( zones.size() ), fileName, srcloc.line );
if( ImGui::IsItemClicked( 1 ) ) if( ImGui::IsItemHovered() )
{ {
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this, m_worker ) ) DrawSourceTooltip( fileName, srcloc.line );
if( ImGui::IsItemClicked( 1 ) )
{ {
ViewSource( fileName, srcloc.line ); if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this, m_worker ) )
} {
else ViewSource( fileName, srcloc.line );
{ }
m_findZoneBuzzAnim.Enable( idx, 0.5f ); else
{
m_findZoneBuzzAnim.Enable( idx, 0.5f );
}
} }
} }
ImGui::PopID(); ImGui::PopID();