mirror of
https://github.com/wolfpld/tracy
synced 2025-05-01 13:13:53 +00:00
Always display statistics mode selection.
Even if only one option is available.
This commit is contained in:
parent
f74818ece5
commit
4c220bdc14
@ -12323,38 +12323,31 @@ void View::DrawStatistics()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImGui::PushStyleVar( ImGuiStyleVar_FramePadding, ImVec2( 2, 2 ) );
|
ImGui::PushStyleVar( ImGuiStyleVar_FramePadding, ImVec2( 2, 2 ) );
|
||||||
|
ImGui::RadioButton( ICON_FA_SYRINGE " Instrumentation", &m_statMode, 0 );
|
||||||
|
ImGui::SameLine();
|
||||||
if( m_worker.AreCallstackSamplesReady() )
|
if( m_worker.AreCallstackSamplesReady() )
|
||||||
{
|
{
|
||||||
const auto hasSamples = m_worker.GetCallstackSampleCount() > 0;
|
if( m_worker.GetCallstackSampleCount() > 0 )
|
||||||
const auto hasSymbols = m_worker.GetSymbolsCount() > 0;
|
|
||||||
|
|
||||||
if( hasSamples || hasSymbols )
|
|
||||||
{
|
{
|
||||||
ImGui::RadioButton( ICON_FA_SYRINGE " Instrumentation", &m_statMode, 0 );
|
|
||||||
ImGui::SameLine();
|
|
||||||
|
|
||||||
if( hasSamples )
|
|
||||||
{
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::RadioButton( ICON_FA_EYE_DROPPER " Sampling", &m_statMode, 1 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::RadioButton( ICON_FA_PUZZLE_PIECE " Symbols", &m_statMode, 1 );
|
|
||||||
}
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SeparatorEx( ImGuiSeparatorFlags_Vertical );
|
ImGui::RadioButton( ICON_FA_EYE_DROPPER " Sampling", &m_statMode, 1 );
|
||||||
ImGui::SameLine();
|
}
|
||||||
|
else if( m_worker.GetSymbolsCount() > 0 )
|
||||||
|
{
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
ImGui::RadioButton( ICON_FA_PUZZLE_PIECE " Symbols", &m_statMode, 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::SeparatorEx( ImGuiSeparatorFlags_Vertical );
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::SameLine();
|
||||||
|
|
||||||
|
|
||||||
Vector<SrcLocZonesSlim> srcloc;
|
Vector<SrcLocZonesSlim> srcloc;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user