1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Disabled: items more consistently release active id if the active item got disabled. (#211) (amend 2952525)

This commit is contained in:
ocornut 2021-07-12 15:36:54 +02:00
parent 638e1a721b
commit 246ad6c03c
2 changed files with 3 additions and 4 deletions

View file

@ -611,10 +611,6 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
}
}
// Release active id if turning disabled
if (g.ActiveId == id && (g.CurrentItemFlags & ImGuiItemFlags_Disabled))
ClearActiveID();
// Process while held
bool held = false;
if (g.ActiveId == id)