Nav: do not clear per-window NavId when window reappears. Process NavInit regardless of current highllight state. Consistently set g.NavLayer in SetNavID(). (#787)

This commit is contained in:
ocornut
2021-03-08 17:14:05 +01:00
parent 954b06afe2
commit 4bb5a36f90
4 changed files with 12 additions and 11 deletions

View File

@ -6581,7 +6581,6 @@ void ImGui::EndMenuBar()
IM_ASSERT(window->DC.NavLayerActiveMaskNext & (1 << layer)); // Sanity check
FocusWindow(window);
SetNavIDWithRectRel(window->NavLastIds[layer], layer, 0, window->NavRectRel[layer]);
g.NavLayer = layer;
g.NavDisableHighlight = true; // Hide highlight for the current frame so we don't see the intermediary selection.
g.NavMoveRequestForward = ImGuiNavForward_ForwardQueued;
NavMoveRequestCancel();