Skip to content

Commit d51e5d2

Browse files
committed
TabItem: revert support for SetNextItemOpen(true) at it creates too much ambiguity with p_open/close button vs Selected state. (ocornut#5262)
Revert a small part of 4b97296.
1 parent c4b9101 commit d51e5d2

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

docs/CHANGELOG.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Other Changes:
105105
merging drawcall of the last column didn't always work (regression since 1.87). (#4843, #4844) [@rokups]
106106
- Inputs: Fixed IsMouseClicked() repeat mode rate being half of keyboard repeat rate.
107107
- ColorEdit: Fixed text baseline alignment after a SameLine() after a ColorEdit() with visible label.
108-
- TabBar: TabItem() now reacts to SetNextItemWidth() and SetNextItemOpen(true). (#5262)
108+
- TabBar: TabItem() now reacts to SetNextItemWidth(). (#5262)
109109
- TabBar: Tweak shrinking policy so that while resizing tabs that don't need shrinking keep their
110110
initial width more precisely (without the occasional +1 worth of width).
111111
- Menus: Adjusted BeginMenu() closing logic so hovering void or non-MenuItem() in parent window

imgui_widgets.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8105,11 +8105,6 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
81058105
tab_bar->NextSelectedTabId = id; // New tabs gets activated
81068106
if ((flags & ImGuiTabItemFlags_SetSelected) && (tab_bar->SelectedTabId != id)) // _SetSelected can only be passed on explicit tab bar
81078107
tab_bar->NextSelectedTabId = id;
8108-
if (g.NextItemData.Flags & ImGuiNextItemDataFlags_HasOpen)
8109-
{
8110-
IM_ASSERT(g.NextItemData.OpenVal == true && g.NextItemData.OpenCond == ImGuiCond_Always); // SetNextItemOpen(true, ImGuiCond_Always) is supported but other combinations are not.
8111-
tab_bar->NextSelectedTabId = id;
8112-
}
81138108
}
81148109

81158110
// Lock visibility

0 commit comments

Comments
 (0)