Nav: fixing assert using Tab in a window without any tabbable element (#4449)

Amend 1a7526dc
This commit is contained in:
ocornut 2021-11-10 11:42:39 +01:00
parent eb02dcf87f
commit a9ea1ae854
2 changed files with 3 additions and 6 deletions

View File

@ -9685,11 +9685,8 @@ void ImGui::NavMoveRequestApplyResult()
// Tabbing forward wrap // Tabbing forward wrap
if (g.NavMoveFlags & ImGuiNavMoveFlags_Tabbing) if (g.NavMoveFlags & ImGuiNavMoveFlags_Tabbing)
if (g.NavTabbingCounter == 1 || g.NavTabbingDir == 0) if ((g.NavTabbingCounter == 1 || g.NavTabbingDir == 0) && g.NavTabbingResultFirst.ID)
{
IM_ASSERT(g.NavTabbingResultFirst.ID != 0);
result = &g.NavTabbingResultFirst; result = &g.NavTabbingResultFirst;
}
// In a situation when there is no results but NavId != 0, re-enable the Navigation highlight (because g.NavId is not considered as a possible result) // In a situation when there is no results but NavId != 0, re-enable the Navigation highlight (because g.NavId is not considered as a possible result)
if (result == NULL) if (result == NULL)

View File

@ -64,7 +64,7 @@ Index of this file:
// Version // Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens) // (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
#define IMGUI_VERSION "1.86 WIP" #define IMGUI_VERSION "1.86 WIP"
#define IMGUI_VERSION_NUM 18509 #define IMGUI_VERSION_NUM 18510
#define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx)) #define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))
#define IMGUI_HAS_TABLE #define IMGUI_HAS_TABLE