Menus: Fixed an issue with child-menu auto-sizing (issue introduced by 6af92b0) (#3779)

This commit is contained in:
ocornut
2021-02-02 13:06:51 +01:00
parent 929563c3a7
commit a3f0393351
4 changed files with 6 additions and 4 deletions

View File

@ -6758,7 +6758,7 @@ bool ImGui::BeginMenu(const char* label, bool enabled)
if (menu_is_open)
{
SetNextWindowPos(popup_pos, ImGuiCond_Always);
SetNextWindowPos(popup_pos, ImGuiCond_Always); // Note: this is super misleading! The value will serve as reference for FindBestWindowPosForPopup(), not actual pos.
menu_is_open = BeginPopupEx(id, flags); // menu_is_open can be 'false' when the popup is completely clipped (e.g. zero size display)
}
else