MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / TableFixColumnSortDirection

Method TableFixColumnSortDirection

include/imgui/imgui_tables.cpp:2937–2943  ·  view source on GitHub ↗

Fix sort direction if currently set on a value which is unavailable (e.g. activating NoSortAscending/NoSortDescending)

Source from the content-addressed store, hash-verified

2935
2936// Fix sort direction if currently set on a value which is unavailable (e.g. activating NoSortAscending/NoSortDescending)
2937void ImGui::TableFixColumnSortDirection(ImGuiTable* table, ImGuiTableColumn* column)
2938{
2939 if (column->SortOrder == -1 || (column->SortDirectionsAvailMask & (1 << column->SortDirection)) != 0)
2940 return;
2941 column->SortDirection = (ImU8)TableGetColumnAvailSortDirection(column, 0);
2942 table->IsSortSpecsDirty = true;
2943}
2944
2945// Calculate next sort direction that would be set after clicking the column
2946// - If the PreferSortDescending flag is set, we will default to a Descending direction on the first click.

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected