mirror of
https://github.com/Drezil/imgui.git
synced 2025-04-16 08:04:00 +00:00
Fixed OpenPopup() accessing current window, effectively opening "Debug" on an empty window stack
This commit is contained in:
parent
0aa353868f
commit
b994dd777a
@ -3005,7 +3005,7 @@ static bool IsPopupOpen(ImGuiID id)
|
|||||||
void ImGui::OpenPopup(const char* str_id)
|
void ImGui::OpenPopup(const char* str_id)
|
||||||
{
|
{
|
||||||
ImGuiState& g = *GImGui;
|
ImGuiState& g = *GImGui;
|
||||||
ImGuiWindow* window = GetCurrentWindow();
|
ImGuiWindow* window = g.CurrentWindow;
|
||||||
ImGuiID id = window->GetID(str_id);
|
ImGuiID id = window->GetID(str_id);
|
||||||
int current_stack_size = g.CurrentPopupStack.Size;
|
int current_stack_size = g.CurrentPopupStack.Size;
|
||||||
ImGuiPopupRef popup_ref = ImGuiPopupRef(id, window, window->GetID("##menus"), g.IO.MousePos); // Tagged as new ref because constructor sets Window to NULL (we are passing the ParentWindow info here)
|
ImGuiPopupRef popup_ref = ImGuiPopupRef(id, window, window->GetID("##menus"), g.IO.MousePos); // Tagged as new ref because constructor sets Window to NULL (we are passing the ParentWindow info here)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user