mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-26 13:37:00 +00:00
Tables: Fix sort specs sometimes incorrectly reporting sort spec count when table loses _MultiSortable flag during runtime.
This commit is contained in:
parent
af992d1321
commit
8690d1f9ce
@ -2330,6 +2330,7 @@ void ImGui::TableSortSpecsSanitize(ImGuiTable* table)
|
|||||||
// Fix: Make sure only one column has a SortOrder if ImGuiTableFlags_MultiSortable is not set.
|
// Fix: Make sure only one column has a SortOrder if ImGuiTableFlags_MultiSortable is not set.
|
||||||
if (need_fix_single_sort_order)
|
if (need_fix_single_sort_order)
|
||||||
{
|
{
|
||||||
|
sort_order_count = 1;
|
||||||
for (int column_n = 0; column_n < table->ColumnsCount; column_n++)
|
for (int column_n = 0; column_n < table->ColumnsCount; column_n++)
|
||||||
if (column_n != column_with_smallest_sort_order)
|
if (column_n != column_with_smallest_sort_order)
|
||||||
table->Columns[column_n].SortOrder = -1;
|
table->Columns[column_n].SortOrder = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user