TabBar: added TabBarQueueFocus() by name for non-docking tab bars. (#8029, #6681)

Amend 655fcf8
This commit is contained in:
ocornut 2024-09-30 20:01:06 +02:00
parent 655fcf8287
commit 004f03945f

View File

@ -9630,7 +9630,7 @@ void ImGui::TabBarQueueFocus(ImGuiTabBar* tab_bar, ImGuiTabItem* tab)
void ImGui::TabBarQueueFocus(ImGuiTabBar* tab_bar, const char* tab_name)
{
IM_ASSERT((tab_bar->Flags & ImGuiTabBarFlags_DockNode) == 0); // Only supported for manual/explicit tab bars
ImGuiID tab_id = TabBarCalcTabID(tab_bar, tab_name);
ImGuiID tab_id = TabBarCalcTabID(tab_bar, tab_name, NULL);
tab_bar->NextSelectedTabId = tab_id;
}