mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Nav: Fixed press Left on sub-menu when parent wasn't a menu - we were just checking at the wrong level. (#787)
This commit is contained in:
parent
eb737e0a42
commit
5c9ea4d53a
@ -11099,7 +11099,7 @@ void ImGui::EndMenu()
|
|||||||
// Nav: When a left move request within our child menu failed, close the menu
|
// Nav: When a left move request within our child menu failed, close the menu
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
ImGuiWindow* window = g.CurrentWindow;
|
ImGuiWindow* window = g.CurrentWindow;
|
||||||
if (g.NavWindow && g.NavWindow->ParentWindow == window && NavMoveRequestButNoResultYet() && g.NavMoveDir == ImGuiDir_Left && window->DC.LayoutType == ImGuiLayoutType_Vertical)
|
if (g.NavWindow == window && g.NavMoveDir == ImGuiDir_Left && NavMoveRequestButNoResultYet() && window->DC.LayoutType == ImGuiLayoutType_Vertical)
|
||||||
{
|
{
|
||||||
ClosePopupToLevel(g.OpenPopupStack.Size - 1);
|
ClosePopupToLevel(g.OpenPopupStack.Size - 1);
|
||||||
NavMoveRequestCancel();
|
NavMoveRequestCancel();
|
||||||
|
Loading…
Reference in New Issue
Block a user