Avoid non-reentrant option in sampling/symbol view

This commit is contained in:
Terence Rokop 2021-06-26 10:36:46 -07:00
parent f000dce73f
commit 1dd117533e
No known key found for this signature in database
GPG Key ID: FB9F472D903AD4FD

View File

@ -12275,8 +12275,12 @@ void View::AccumulationModeComboBox()
{
ImGui::TextUnformatted( "Accumulation mode" );
ImGui::SameLine();
const char* accumulationModeTable = "Self only\0Including children\0Non-reentrant\0";
const char* accumulationModeTable = m_statMode == 0 ? "Self only\0Including children\0Non-reentrant\0" : "Self only\0Including children\0";
ImGui::SetNextItemWidth( ImGui::CalcTextSize( "Including children" ).x + ImGui::GetTextLineHeight() * 2 );
if ( m_statMode != 0 && m_statAccumulationMode == AccumulationMode::NonReentrantChildren )
{
m_statAccumulationMode = AccumulationMode::SelfOnly;
}
int accumulationMode = static_cast<int>( m_statAccumulationMode );
ImGui::Combo( "##accumulationMode", &accumulationMode, accumulationModeTable );
m_statAccumulationMode = static_cast<AccumulationMode>( accumulationMode );