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

View File

@ -1377,7 +1377,7 @@ At high zoom levels, the zones will be displayed with additional markers, as pre
The GPU zones are displayed just like CPU zones, with an OpenGL/Vulkan context in place of a thread name.
Hovering the \faMousePointer{} mouse pointer over a zone will highlight all other zones that have the same source location with a white outline. Clicking the \LMB{} left mouse button on a zone will open zone information window (section~\ref{zoneinfo}). Clicking the \MMB{} middle mouse button on a zone will zoom the view to the extent of the zone.
Hovering the \faMousePointer{} mouse pointer over a zone will highlight all other zones that have the same source location with a white outline. Clicking the \LMB{}~left mouse button on a zone will open zone information window (section~\ref{zoneinfo}). Holding the \keys{\ctrl} key and clicking the \LMB{}~left mouse button on a zone will open zone statistics window (section~\ref{findzone}). Clicking the \MMB{}~middle mouse button on a zone will zoom the view to the extent of the zone.
\subparagraph{Locks}

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;