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

Add source preview to lock info window source location.

This commit is contained in:
Bartosz Taudul 2022-07-24 00:18:57 +02:00
parent 0a00925a9b
commit 5bee753376
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -988,15 +988,19 @@ void View::DrawLockInfoWindow()
ImGui::SameLine();
}
ImGui::TextUnformatted( LocationToString( 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 );
}
else
{
m_lockInfoAnim.Enable( m_lockInfoWindow, 0.5f );
if( SourceFileValid( fileName, m_worker.GetCaptureTime(), *this, m_worker ) )
{
ViewSource( fileName, srcloc.line );
}
else
{
m_lockInfoAnim.Enable( m_lockInfoWindow, 0.5f );
}
}
}
ImGui::Separator();