1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-28 01:20:55 +01:00

Drag and Drop: fix using AcceptDragDropPayload() with ImGuiDragDropFlags_AcceptNoPreviewTooltip.

Window was not properly hidden in that case.
This commit is contained in:
ocornut 2021-08-18 12:53:33 +02:00
parent f24abbc47d
commit 7bbf8f2ab0
2 changed files with 2 additions and 1 deletions

View File

@ -75,6 +75,7 @@ Other Changes:
- InputInt/InputFloat: When used with Steps values and _ReadOnly flag, the step button look disabled. (#211) - InputInt/InputFloat: When used with Steps values and _ReadOnly flag, the step button look disabled. (#211)
- InputText: Fixed named filtering flags disabling newline or tabs in multiline inputs (#4409, #4410) [@kfsone] - InputText: Fixed named filtering flags disabling newline or tabs in multiline inputs (#4409, #4410) [@kfsone]
- Drag and Drop: drop target highlight doesn't try to bypass host clipping rectangle. (#4281, #3272) - Drag and Drop: drop target highlight doesn't try to bypass host clipping rectangle. (#4281, #3272)
- Drag and Drop: fix using AcceptDragDropPayload() with ImGuiDragDropFlags_AcceptNoPreviewTooltip. [@JeffM2501]
- Menus: MenuItem() and BeginMenu() are not affected/overlapping when style.SelectableTextAlign is altered. - Menus: MenuItem() and BeginMenu() are not affected/overlapping when style.SelectableTextAlign is altered.
- Menus: fix hovering a disabled menu or menu item not closing other menus. (#211) - Menus: fix hovering a disabled menu or menu item not closing other menus. (#211)
- Popups: fix BeginPopup/OpenPopup sequence failing when there are no focused windows. (#4308) [@rokups] - Popups: fix BeginPopup/OpenPopup sequence failing when there are no focused windows. (#4308) [@rokups]

View File

@ -9960,7 +9960,7 @@ bool ImGui::BeginDragDropSource(ImGuiDragDropFlags flags)
if (g.DragDropAcceptIdPrev && (g.DragDropAcceptFlags & ImGuiDragDropFlags_AcceptNoPreviewTooltip)) if (g.DragDropAcceptIdPrev && (g.DragDropAcceptFlags & ImGuiDragDropFlags_AcceptNoPreviewTooltip))
{ {
ImGuiWindow* tooltip_window = g.CurrentWindow; ImGuiWindow* tooltip_window = g.CurrentWindow;
tooltip_window->SkipItems = true; tooltip_window->Hidden = tooltip_window->SkipItems = true;
tooltip_window->HiddenFramesCanSkipItems = 1; tooltip_window->HiddenFramesCanSkipItems = 1;
} }
} }