mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-12 00:14:20 +00:00
Internals: SetActiveID window cannot be NULL
This commit is contained in:
parent
4548bcb5c9
commit
48498b337d
1 changed files with 4 additions and 4 deletions
|
|
@ -1963,10 +1963,10 @@ void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window)
|
|||
if (id)
|
||||
{
|
||||
g.NavId = id;
|
||||
if (window)
|
||||
g.NavLayer = window->DC.NavLayerCurrent;
|
||||
if (window) // NB: We current assume that SetActiveId() is called in the context where its NavLayer is the current one, which should be the case.
|
||||
window->NavLastIds[window->DC.NavLayerCurrent] = id;
|
||||
|
||||
// Assume that SetActiveID() is called in the context where its NavLayer is the current layer, which is the case everywhere we call it.
|
||||
g.NavLayer = window->DC.NavLayerCurrent;
|
||||
window->NavLastIds[window->DC.NavLayerCurrent] = id;
|
||||
if (g.ActiveIdSource == ImGuiInputSource_Nav)
|
||||
g.NavDisableMouseHover = true;
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue