Pressing Z will temporarily switch child calls.

This commit is contained in:
Bartosz Taudul 2021-04-20 18:13:15 +02:00
parent e189f596ac
commit 0bbda5ea11
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -1118,18 +1118,22 @@ void SourceView::RenderSymbolView( const Worker& worker, View& view )
GatherAdditionalIpStats( m_symAddr, iptotalSrc, iptotalAsm, ipcountSrc, ipcountAsm, ipmaxSrc, ipmaxAsm, worker, limitView, view );
iptotalSrc = iptotalAsm;
}
const auto slzReady = worker.AreSourceLocationZonesReady();
if( ( iptotalAsm.local + iptotalAsm.ext ) > 0 || ( view.m_statRange.active && worker.GetSamplesForSymbol( m_baseAddr ) ) )
{
ImGui::SameLine();
ImGui::Spacing();
ImGui::SameLine();
const auto slzReady = worker.AreSourceLocationZonesReady();
if( !slzReady )
{
ImGui::PushItemFlag( ImGuiItemFlags_Disabled, true );
ImGui::PushStyleVar( ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.5f );
m_childCalls = false;
}
else if( ImGui::IsKeyDown( 'Z' ) )
{
m_childCalls = !m_childCalls;
}
SmallCheckbox( ICON_FA_SIGN_OUT_ALT " Child calls", &m_childCalls );
if( !slzReady )
{
@ -1142,6 +1146,15 @@ void SourceView::RenderSymbolView( const Worker& worker, View& view )
ImGui::EndTooltip();
}
}
else
{
if( ImGui::IsItemHovered() )
{
ImGui::BeginTooltip();
ImGui::TextUnformatted( "Press Z key to temporarily reverse selection." );
ImGui::EndTooltip();
}
}
ImGui::SameLine();
ImGui::Spacing();
ImGui::SameLine();
@ -1238,6 +1251,8 @@ void SourceView::RenderSymbolView( const Worker& worker, View& view )
break;
}
if( slzReady && ImGui::IsKeyDown( 'Z' ) ) m_childCalls = !m_childCalls;
if( jumpOut != 0 )
{
auto sym = worker.GetSymbolData( jumpOut );