Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-07-24 01:18:57 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-07-24 01:18:57 +0300
commit5bee7533767832b65939913393bffa62519e5300 (patch)
tree676ba55e9156a00aada8b747eb2a4b57c18522ca /server/TracyView_Locks.cpp
parent0a00925a9bd1d3f032818a941031eed4e3371dd0 (diff)
Add source preview to lock info window source location.
Diffstat (limited to 'server/TracyView_Locks.cpp')
-rw-r--r--server/TracyView_Locks.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/server/TracyView_Locks.cpp b/server/TracyView_Locks.cpp
index eda3b93e..c21949bc 100644
--- a/server/TracyView_Locks.cpp
+++ b/server/TracyView_Locks.cpp
@@ -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();