1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Ctrl-click on a zone to go straight to zone statistics.

This commit is contained in:
Bartosz Taudul
2019-06-16 17:00:25 +02:00
parent d361261993
commit 6e8b5381a5
2 changed files with 19 additions and 3 deletions
+18 -2
View File
@@ -2457,7 +2457,15 @@ int View::DrawZoneLevel( const Vector<ZoneEvent*>& vec, bool hover, double pxns,
}
if( ImGui::IsMouseClicked( 0 ) )
{
ShowZoneInfo( ev );
if( ImGui::GetIO().KeyCtrl )
{
auto& srcloc = m_worker.GetSourceLocation( ev.srcloc );
m_findZone.ShowZone( ev.srcloc, m_worker.GetString( srcloc.name.active ? srcloc.name : srcloc.function ) );
}
else
{
ShowZoneInfo( ev );
}
}
m_zoneSrcLocHighlight = ev.srcloc;
@@ -2584,7 +2592,15 @@ int View::DrawZoneLevel( const Vector<ZoneEvent*>& vec, bool hover, double pxns,
}
if( ImGui::IsMouseClicked( 0 ) )
{
ShowZoneInfo( ev );
if( ImGui::GetIO().KeyCtrl )
{
auto& srcloc = m_worker.GetSourceLocation( ev.srcloc );
m_findZone.ShowZone( ev.srcloc, m_worker.GetString( srcloc.name.active ? srcloc.name : srcloc.function ) );
}
else
{
ShowZoneInfo( ev );
}
}
m_zoneSrcLocHighlight = ev.srcloc;