From 3b48252bb38740fdb8069c66161366738c6889ad Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 7 Feb 2025 17:15:52 +0100 Subject: [PATCH] Move "group by function name" checkbox to a more appropriate place. --- profiler/src/profiler/TracyView_Samples.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/profiler/src/profiler/TracyView_Samples.cpp b/profiler/src/profiler/TracyView_Samples.cpp index 72bb95ad..e16ffa5d 100644 --- a/profiler/src/profiler/TracyView_Samples.cpp +++ b/profiler/src/profiler/TracyView_Samples.cpp @@ -901,6 +901,20 @@ void View::DrawSampleParents() ImGui::Spacing(); ImGui::SameLine(); ImGui::Checkbox( ICON_FA_STOPWATCH " Show time", &m_statSampleTime ); + if( m_sampleParents.mode == 1 ) + { + ImGui::SameLine(); + ImGui::Spacing(); + ImGui::SameLine(); + ImGui::Checkbox( ICON_FA_LAYER_GROUP " Group by function name", &m_sampleParents.groupBottomUp ); + } + else if( m_sampleParents.mode == 2 ) + { + ImGui::SameLine(); + ImGui::Spacing(); + ImGui::SameLine(); + ImGui::Checkbox( ICON_FA_LAYER_GROUP " Group by function name", &m_sampleParents.groupTopDown ); + } ImGui::PopStyleVar(); ImGui::Separator(); ImGui::BeginChild( "##sampleParents" ); @@ -1144,7 +1158,6 @@ void View::DrawSampleParents() } case 1: { - SmallCheckbox( ICON_FA_LAYER_GROUP " Group by function name", &m_sampleParents.groupBottomUp ); auto tree = GetParentsCallstackFrameTreeBottomUp( stats, m_sampleParents.groupBottomUp ); if( !tree.empty() ) { @@ -1160,7 +1173,6 @@ void View::DrawSampleParents() } case 2: { - SmallCheckbox( ICON_FA_LAYER_GROUP " Group by function name", &m_sampleParents.groupTopDown ); auto tree = GetParentsCallstackFrameTreeTopDown( stats, m_sampleParents.groupTopDown ); if( !tree.empty() ) {