Skip to content

Commit 03add24

Browse files
committed
Selectable: Internals: removed unused ImGuiSelectableFlags_DrawHoveredWhenHeld flag.
Needlessly introduced in baae057 from WIP tables branch at the time, ended up unused by Tables. A comment "I find it counter intuitive that hovering supersedes activation." in #3516 led me to this however this is not the cause of said issue.
1 parent 57a5b73 commit 03add24

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

imgui_internal.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -890,10 +890,9 @@ enum ImGuiSelectableFlagsPrivate_
890890
ImGuiSelectableFlags_SelectOnClick = 1 << 22, // Override button behavior to react on Click (default is Click+Release)
891891
ImGuiSelectableFlags_SelectOnRelease = 1 << 23, // Override button behavior to react on Release (default is Click+Release)
892892
ImGuiSelectableFlags_SpanAvailWidth = 1 << 24, // Span all avail width even if we declared less for layout purpose. FIXME: We may be able to remove this (added in 6251d379, 2bcafc86 for menus)
893-
ImGuiSelectableFlags_DrawHoveredWhenHeld = 1 << 25, // Always show active when held, even is not hovered. This concept could probably be renamed/formalized somehow.
894-
ImGuiSelectableFlags_SetNavIdOnHover = 1 << 26, // Set Nav/Focus ID on mouse hover (used by MenuItem)
895-
ImGuiSelectableFlags_NoPadWithHalfSpacing = 1 << 27, // Disable padding each side with ItemSpacing * 0.5f
896-
ImGuiSelectableFlags_NoSetKeyOwner = 1 << 28, // Don't set key/input owner on the initial click (note: mouse buttons are keys! often, the key in question will be ImGuiKey_MouseLeft!)
893+
ImGuiSelectableFlags_SetNavIdOnHover = 1 << 25, // Set Nav/Focus ID on mouse hover (used by MenuItem)
894+
ImGuiSelectableFlags_NoPadWithHalfSpacing = 1 << 26, // Disable padding each side with ItemSpacing * 0.5f
895+
ImGuiSelectableFlags_NoSetKeyOwner = 1 << 27, // Don't set key/input owner on the initial click (note: mouse buttons are keys! often, the key in question will be ImGuiKey_MouseLeft!)
897896
};
898897

899898
// Extend ImGuiTreeNodeFlags_

imgui_widgets.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -6370,8 +6370,6 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
63706370
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_ToggledSelection;
63716371

63726372
// Render
6373-
if (held && (flags & ImGuiSelectableFlags_DrawHoveredWhenHeld))
6374-
hovered = true;
63756373
if (hovered || selected)
63766374
{
63776375
const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);

0 commit comments

Comments
 (0)