mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Pressing Z will temporarily switch child calls.
This commit is contained in:
parent
e189f596ac
commit
0bbda5ea11
@ -1118,18 +1118,22 @@ void SourceView::RenderSymbolView( const Worker& worker, View& view )
|
|||||||
GatherAdditionalIpStats( m_symAddr, iptotalSrc, iptotalAsm, ipcountSrc, ipcountAsm, ipmaxSrc, ipmaxAsm, worker, limitView, view );
|
GatherAdditionalIpStats( m_symAddr, iptotalSrc, iptotalAsm, ipcountSrc, ipcountAsm, ipmaxSrc, ipmaxAsm, worker, limitView, view );
|
||||||
iptotalSrc = iptotalAsm;
|
iptotalSrc = iptotalAsm;
|
||||||
}
|
}
|
||||||
|
const auto slzReady = worker.AreSourceLocationZonesReady();
|
||||||
if( ( iptotalAsm.local + iptotalAsm.ext ) > 0 || ( view.m_statRange.active && worker.GetSamplesForSymbol( m_baseAddr ) ) )
|
if( ( iptotalAsm.local + iptotalAsm.ext ) > 0 || ( view.m_statRange.active && worker.GetSamplesForSymbol( m_baseAddr ) ) )
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
const auto slzReady = worker.AreSourceLocationZonesReady();
|
|
||||||
if( !slzReady )
|
if( !slzReady )
|
||||||
{
|
{
|
||||||
ImGui::PushItemFlag( ImGuiItemFlags_Disabled, true );
|
ImGui::PushItemFlag( ImGuiItemFlags_Disabled, true );
|
||||||
ImGui::PushStyleVar( ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.5f );
|
ImGui::PushStyleVar( ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.5f );
|
||||||
m_childCalls = false;
|
m_childCalls = false;
|
||||||
}
|
}
|
||||||
|
else if( ImGui::IsKeyDown( 'Z' ) )
|
||||||
|
{
|
||||||
|
m_childCalls = !m_childCalls;
|
||||||
|
}
|
||||||
SmallCheckbox( ICON_FA_SIGN_OUT_ALT " Child calls", &m_childCalls );
|
SmallCheckbox( ICON_FA_SIGN_OUT_ALT " Child calls", &m_childCalls );
|
||||||
if( !slzReady )
|
if( !slzReady )
|
||||||
{
|
{
|
||||||
@ -1142,6 +1146,15 @@ void SourceView::RenderSymbolView( const Worker& worker, View& view )
|
|||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if( ImGui::IsItemHovered() )
|
||||||
|
{
|
||||||
|
ImGui::BeginTooltip();
|
||||||
|
ImGui::TextUnformatted( "Press Z key to temporarily reverse selection." );
|
||||||
|
ImGui::EndTooltip();
|
||||||
|
}
|
||||||
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -1238,6 +1251,8 @@ void SourceView::RenderSymbolView( const Worker& worker, View& view )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( slzReady && ImGui::IsKeyDown( 'Z' ) ) m_childCalls = !m_childCalls;
|
||||||
|
|
||||||
if( jumpOut != 0 )
|
if( jumpOut != 0 )
|
||||||
{
|
{
|
||||||
auto sym = worker.GetSymbolData( jumpOut );
|
auto sym = worker.GetSymbolData( jumpOut );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user