mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-19 01:24:20 +00:00
BeginMenu: Fixed a bug where SetNextWindowXXX data before a BeginMenu() would not be cleared when the menu is not open. (#3030)
This commit is contained in:
parent
8836975dcf
commit
ea3fc76038
2 changed files with 6 additions and 0 deletions
|
|
@ -6345,6 +6345,10 @@ bool ImGui::BeginMenu(const char* label, bool enabled)
|
|||
flags |= ImGuiWindowFlags_ChildWindow;
|
||||
menu_is_open = BeginPopupEx(id, flags); // menu_is_open can be 'false' when the popup is completely clipped (e.g. zero size display)
|
||||
}
|
||||
else
|
||||
{
|
||||
g.NextWindowData.ClearFlags(); // We behave like Begin() and need to consume those values
|
||||
}
|
||||
|
||||
return menu_is_open;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue