mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Combo: Made simple/legacy Combo() function not returns true when picking already selected item. (#1182)
This commit is contained in:
parent
6137443d24
commit
a02315e1c4
@ -88,6 +88,8 @@ Other changes:
|
||||
- CollapsingHeader/TreeNode: Fixed text padding when using _Framed+_Leaf flags. (#6549) [@BobbyAnguelov]
|
||||
- InputText: Fixed not returning true when buffer is cleared while using the
|
||||
ImGuiInputTextFlags_EscapeClearsAll flag. (#5688, #2620)
|
||||
- Combo: Made simple/legacy Combo() function not returns true when picking already selected item.
|
||||
This is consistent with other widgets. If you need something else, you can use BeginCombo(). (#1182)
|
||||
- Clipper: Rework inner logic to allow functioning with a zero-clear constructor.
|
||||
This is order to facilitate usage for language bindings (e.g cimgui or dear_binding)
|
||||
where user may not be callinga constructor manually. (#5856)
|
||||
|
@ -167,7 +167,6 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
||||
- drag float: added leeway on edge (e.g. a few invisible steps past the clamp limits)
|
||||
|
||||
- combo: use clipper.
|
||||
- combo: flag for BeginCombo to not return true when unchanged (#1182)
|
||||
- combo: a way/helper to customize the combo preview (#1658) -> experimental BeginComboPreview()
|
||||
- combo/listbox: keyboard control. need InputText-like non-active focus + key handling. considering keyboard for custom listbox (pr #203)
|
||||
- listbox: multiple selection (WIP range-select branch)
|
||||
|
@ -1926,7 +1926,7 @@ bool ImGui::Combo(const char* label, int* current_item, bool (*items_getter)(voi
|
||||
const char* item_text;
|
||||
if (!items_getter(data, i, &item_text))
|
||||
item_text = "*Unknown item*";
|
||||
if (Selectable(item_text, item_selected))
|
||||
if (Selectable(item_text, item_selected) && *current_item != i)
|
||||
{
|
||||
value_changed = true;
|
||||
*current_item = i;
|
||||
|
Loading…
Reference in New Issue
Block a user