Unify comparison for accumulation mode combo box.

This commit is contained in:
Bartosz Taudul 2022-01-23 14:51:48 +01:00
parent f3f5f1dab8
commit 3ee91b909f
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -12692,9 +12692,9 @@ void View::AccumulationModeComboBox()
{
ImGui::TextUnformatted( "Timing" );
ImGui::SameLine();
const char* accumulationModeTable = m_statMode == 0 ? "Self only\0With children\0Non-reentrant\0" : "Self only\0With children\0";
const char* accumulationModeTable = m_statMode == 1 ? "Self only\0With children\0" : "Self only\0With children\0Non-reentrant\0";
ImGui::SetNextItemWidth( ImGui::CalcTextSize( "Non-reentrant" ).x + ImGui::GetTextLineHeight() * 2 );
if ( m_statMode != 0 && m_statAccumulationMode == AccumulationMode::NonReentrantChildren )
if( m_statMode == 1 && m_statAccumulationMode == AccumulationMode::NonReentrantChildren )
{
m_statAccumulationMode = AccumulationMode::SelfOnly;
}