From 376035fd01d7b7051af6d63fc6ee206d5fae031f Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 6 Nov 2023 14:03:40 +0100 Subject: [PATCH] Nav: fixed programmatic nav calls (e.g. SetKeyboardFocusHere() from storing io.KeyMods) Note that the g.NavMoveKeyMods -> g.NavJustMovedToKeyMods chain is not used in this branch. Multi-select uses it. --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index cb20e5129..ec808425d 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -11362,7 +11362,7 @@ void ImGui::NavMoveRequestSubmit(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavM g.NavMoveFlags = move_flags; g.NavMoveScrollFlags = scroll_flags; g.NavMoveForwardToNextFrame = false; - g.NavMoveKeyMods = g.IO.KeyMods; + g.NavMoveKeyMods = (move_flags & ImGuiNavMoveFlags_FocusApi) ? 0 : g.IO.KeyMods; g.NavMoveResultLocal.Clear(); g.NavMoveResultLocalVisible.Clear(); g.NavMoveResultOther.Clear();