mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-25 21:17:01 +00:00
Tables: Fixed headers closing popups.
This commit is contained in:
parent
f5eee210a0
commit
787a309445
@ -1979,7 +1979,7 @@ void ImGui::TableHeader(const char* label)
|
|||||||
|
|
||||||
// Keep header highlighted when context menu is open. (FIXME-TABLE: however we cannot assume the ID of said popup if it has been created by the user...)
|
// Keep header highlighted when context menu is open. (FIXME-TABLE: however we cannot assume the ID of said popup if it has been created by the user...)
|
||||||
const bool selected = (table->IsContextPopupOpen && table->ContextPopupColumn == column_n && table->InstanceInteracted == table->InstanceNo);
|
const bool selected = (table->IsContextPopupOpen && table->ContextPopupColumn == column_n && table->InstanceInteracted == table->InstanceNo);
|
||||||
const bool pressed = Selectable("", selected, ImGuiSelectableFlags_DrawHoveredWhenHeld, ImVec2(0.0f, label_height));
|
const bool pressed = Selectable("", selected, ImGuiSelectableFlags_DrawHoveredWhenHeld | ImGuiSelectableFlags_DontClosePopups, ImVec2(0.0f, label_height));
|
||||||
const bool held = IsItemActive();
|
const bool held = IsItemActive();
|
||||||
if (held)
|
if (held)
|
||||||
table->HeldHeaderColumn = (ImS8)column_n;
|
table->HeldHeaderColumn = (ImS8)column_n;
|
||||||
|
Loading…
Reference in New Issue
Block a user