From 8690d1f9cec767878a97d01dd8d723b26a00bc36 Mon Sep 17 00:00:00 2001 From: Rokas Kupstys Date: Mon, 1 Jun 2020 12:25:08 +0300 Subject: [PATCH] Tables: Fix sort specs sometimes incorrectly reporting sort spec count when table loses _MultiSortable flag during runtime. --- imgui_tables.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui_tables.cpp b/imgui_tables.cpp index 48ef06a7..3fec1061 100644 --- a/imgui_tables.cpp +++ b/imgui_tables.cpp @@ -2330,6 +2330,7 @@ void ImGui::TableSortSpecsSanitize(ImGuiTable* table) // Fix: Make sure only one column has a SortOrder if ImGuiTableFlags_MultiSortable is not set. if (need_fix_single_sort_order) { + sort_order_count = 1; for (int column_n = 0; column_n < table->ColumnsCount; column_n++) if (column_n != column_with_smallest_sort_order) table->Columns[column_n].SortOrder = -1;