mirror of
https://github.com/ocornut/imgui.git
synced 2026-04-02 05:39:28 +00:00
Tables: context menu now present columns in display order. (#9312)
This commit is contained in:
@@ -93,6 +93,7 @@ Other Changes:
|
||||
using the idiom of not applying edits before IsItemDeactivatedAfterEdit().
|
||||
(#9308, #8915, #8273)
|
||||
- Tables:
|
||||
- Context menu now presents columns in display order. (#9312)
|
||||
- Fixed and clarified the behavior of using TableSetupScrollFreeze() with columns>1,
|
||||
and where some of the columns within that range were Hidable.
|
||||
- Before: TableSetupScrollFreeze(N, 0) made the first N _visible_ columns
|
||||
|
||||
@@ -3574,8 +3574,9 @@ void ImGui::TableDrawDefaultContextMenu(ImGuiTable* table, ImGuiTableFlags flags
|
||||
want_separator = true;
|
||||
|
||||
PushItemFlag(ImGuiItemFlags_AutoClosePopups, false);
|
||||
for (int column_n = 0; column_n < table->ColumnsCount; column_n++)
|
||||
for (int order_n = 0; order_n < table->ColumnsCount; order_n++)
|
||||
{
|
||||
const int column_n = table->DisplayOrderToIndex[order_n];
|
||||
ImGuiTableColumn* column = &table->Columns[column_n];
|
||||
if (column->Flags & ImGuiTableColumnFlags_Disabled)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user