Skip to content

Commit

Permalink
[UPD] : update for imgui 1.84.2
Browse files Browse the repository at this point in the history
  • Loading branch information
aiekick committed Sep 18, 2021
1 parent c8ccc5f commit 2e756b0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ImGuiFileDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,8 @@ namespace IGFD
return false;

const bool disabled_global = (g.CurrentItemFlags & ImGuiItemFlags_Disabled) != 0;
if (disabled_item && !disabled_global)
PushDisabled(true);
if (disabled_item && !disabled_global) // Only testing this as an optimization
BeginDisabled(true);

// FIXME: We can standardize the behavior of those two, we could also keep the fast path of override ClipRect + full push on render only,
// which would be advantageous since most selectable are not selected.
Expand Down Expand Up @@ -667,14 +667,14 @@ namespace IGFD
RenderTextClipped(text_min, text_max, label, NULL, &label_size, style.SelectableTextAlign, &bb);

// Automatically close popups
if (pressed && (window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiSelectableFlags_DontClosePopups) && !(g.CurrentItemFlags & ImGuiItemFlags_SelectableDontClosePopup))
if (pressed && (window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiSelectableFlags_DontClosePopups) && !(g.LastItemData.InFlags & ImGuiItemFlags_SelectableDontClosePopup))
CloseCurrentPopup();

if (disabled_item && !disabled_global)
PopDisabled();
EndDisabled();

IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
return pressed;
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags);
return pressed; //-V1020
}
#endif // USE_EXPLORATION_BY_KEYS

Expand Down

0 comments on commit 2e756b0

Please sign in to comment.