From eacb64a7143a42ac9783f1d2d7ef3f77bf38c796 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 4 Aug 2026 19:43:55 +0200 Subject: [PATCH] Hack around lack of flag to always enable scrollbar in a table. https://github.com/ocornut/imgui/issues/9499#issuecomment-5182563922 --- profiler/src/profiler/TracySourceView.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/profiler/src/profiler/TracySourceView.cpp b/profiler/src/profiler/TracySourceView.cpp index 4c61284a..5982f37a 100644 --- a/profiler/src/profiler/TracySourceView.cpp +++ b/profiler/src/profiler/TracySourceView.cpp @@ -4,7 +4,7 @@ #include #include -#include "imgui.h" +#include "imgui_internal.h" #include "TracyCharUtil.hpp" #include "TracyColor.hpp" #include "TracyConfig.hpp" @@ -1212,6 +1212,11 @@ void SourceView::RenderSymbolView( Worker& worker, View& view, WindowConstraints vec.reserve( map.size() ); for( auto& v : map ) vec.emplace_back( ChildStat { v.first, v.second } ); pdqsort_branchless( vec.begin(), vec.end(), []( const auto& lhs, const auto& rhs ) { return lhs.count > rhs.count; } ); + + ImGuiContext& g = *GImGui; + g.NextWindowData.HasFlags |= ImGuiNextWindowDataFlags_HasWindowFlags; + g.NextWindowData.WindowFlags = ImGuiWindowFlags_AlwaysVerticalScrollbar; + if( ImGui::BeginTable( "##ccd", 7, ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable | ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_ScrollY ) ) { ImGui::TableSetupScrollFreeze( 0, 1 );