Skip to content

Commit

Permalink
Popups: calling OpenPopup() on already open popup doesn't close it's …
Browse files Browse the repository at this point in the history
…child (#126)

Fixed previous commit.
  • Loading branch information
ocornut committed May 28, 2015
1 parent 78dc54a commit aaefe46
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3059,7 +3059,10 @@ void ImGui::OpenPopup(const char* str_id)
if (g.OpenedPopupStack.size() < current_stack_size + 1)
g.OpenedPopupStack.push_back(popup_ref);
else if (g.OpenedPopupStack[current_stack_size].PopupID != id)
{
g.OpenedPopupStack.resize(current_stack_size+1);
g.OpenedPopupStack[current_stack_size] = popup_ref;
}
}

static void CloseInactivePopups()
Expand Down

0 comments on commit aaefe46

Please sign in to comment.