mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Nav, Docking, Selection: Fixed tab change from reinitializing navigation state. (#8997)
This commit is contained in:
parent
28ed29078b
commit
96ad003000
2 changed files with 7 additions and 3 deletions
|
|
@ -140,7 +140,10 @@ Other Changes:
|
|||
|
||||
Docking+Viewports Branch:
|
||||
|
||||
- Nav: fixed a crash that could occur when opening a popup following the processing
|
||||
- Nav, Docking, Selection: Fixed tab change from reinitializing navigation state,
|
||||
which would erroneously clear selection when using ImGuiSelectableFlags_SelectOnNav
|
||||
or clear multi-selection when not using ImGuiMultiSelectFlags_NoAutoSelect. (#8997)
|
||||
- Nav: Fixed a crash that could occur when opening a popup following the processing
|
||||
of a global shortcut while no windows were focused (the fix done in 1.92.3 was
|
||||
incomplete for docking branch).
|
||||
- Viewports:
|
||||
|
|
|
|||
|
|
@ -14953,7 +14953,7 @@ static void ImGui::NavUpdateWindowingApplyFocus(ImGuiWindow* apply_focus_window)
|
|||
FocusWindow(apply_focus_window, ImGuiFocusRequestFlags_RestoreFocusedChild);
|
||||
IM_ASSERT(g.NavWindow != NULL);
|
||||
apply_focus_window = g.NavWindow;
|
||||
if (apply_focus_window->NavLastIds[0] == 0)
|
||||
if (apply_focus_window->NavLastIds[0] == 0) // FIXME: This is the equivalent of the 'if (g.NavId == 0) { NavInitWindow() }' in DockNodeUpdateTabBar().
|
||||
NavInitWindow(apply_focus_window, false);
|
||||
|
||||
// If the window has ONLY a menu layer (no main layer), select it directly
|
||||
|
|
@ -19366,7 +19366,8 @@ static void ImGui::DockNodeUpdateTabBar(ImGuiDockNode* node, ImGuiWindow* host_w
|
|||
if (tab->Window)
|
||||
{
|
||||
FocusWindow(tab->Window);
|
||||
NavInitWindow(tab->Window, false);
|
||||
if (g.NavId == 0) // only init if FocusWindow() didn't restore anything.
|
||||
NavInitWindow(tab->Window, false);
|
||||
}
|
||||
|
||||
EndTabBar();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue