mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
Internals: Tracking dummy select scope id (currently always zero) to facilitate merging of the range_select branch. (#1861)
This commit is contained in:
@ -7321,6 +7321,7 @@ static void ImGui::NavProcessItem(ImGuiWindow* window, const ImRect& nav_bb, con
|
||||
if (new_best)
|
||||
{
|
||||
result->ID = id;
|
||||
result->SelectScopeId = g.MultiSelectScopeId;
|
||||
result->Window = window;
|
||||
result->RectRel = nav_bb_rel;
|
||||
}
|
||||
@ -7332,6 +7333,7 @@ static void ImGui::NavProcessItem(ImGuiWindow* window, const ImRect& nav_bb, con
|
||||
{
|
||||
result = &g.NavMoveResultLocalVisibleSet;
|
||||
result->ID = id;
|
||||
result->SelectScopeId = g.MultiSelectScopeId;
|
||||
result->Window = window;
|
||||
result->RectRel = nav_bb_rel;
|
||||
}
|
||||
@ -7872,8 +7874,13 @@ static void ImGui::NavUpdateMoveResult()
|
||||
|
||||
ClearActiveID();
|
||||
g.NavWindow = result->Window;
|
||||
if (g.NavId != result->ID)
|
||||
{
|
||||
// Don't set NavJustMovedToId if just landed on the same spot (which may happen with ImGuiNavMoveFlags_AllowCurrentNavId)
|
||||
g.NavJustMovedToId = result->ID;
|
||||
g.NavJustMovedToSelectScopeId = result->SelectScopeId;
|
||||
}
|
||||
SetNavIDWithRectRel(result->ID, g.NavLayer, result->RectRel);
|
||||
g.NavJustMovedToId = result->ID;
|
||||
g.NavMoveFromClampedRefRect = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user