mirror of
https://github.com/ocornut/imgui.git
synced 2026-06-01 01:06:31 +08:00
MultiSelect, TreeNode, Drag and Drop: fixed an issue where carrying a drag and drop payload over an already open tree node would select it. (#7850)
This commit is contained in:
@@ -43,6 +43,8 @@ Breaking changes:
|
|||||||
|
|
||||||
Other changes:
|
Other changes:
|
||||||
|
|
||||||
|
- MultiSelect, TreeNode, Drag and Drop: fixed an issue where carrying a drag and drop
|
||||||
|
payload over an already open tree node would incorrectly select it. (#7850)
|
||||||
- Backends: GLFW: added ImGui_ImplGlfw_Sleep() helper function because GLFW does not
|
- Backends: GLFW: added ImGui_ImplGlfw_Sleep() helper function because GLFW does not
|
||||||
provide a way to do a portable sleep. (#7844)
|
provide a way to do a portable sleep. (#7844)
|
||||||
- Examples: GLFW (all), SDL2 (all), SDL3 (all), Win32+OpenGL3: rework examples main loop
|
- Examples: GLFW (all), SDL2 (all), SDL3 (all), Win32+OpenGL3: rework examples main loop
|
||||||
|
|||||||
@@ -6531,6 +6531,8 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
|
|||||||
IM_ASSERT(button_flags & ImGuiButtonFlags_PressedOnDragDropHold);
|
IM_ASSERT(button_flags & ImGuiButtonFlags_PressedOnDragDropHold);
|
||||||
if (!is_open) // When using Drag and Drop "hold to open" we keep the node highlighted after opening, but never close it again.
|
if (!is_open) // When using Drag and Drop "hold to open" we keep the node highlighted after opening, but never close it again.
|
||||||
toggled = true;
|
toggled = true;
|
||||||
|
else
|
||||||
|
pressed = false; // Cancel press so it doesn't trigger selection.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g.NavId == id && g.NavMoveDir == ImGuiDir_Left && is_open)
|
if (g.NavId == id && g.NavMoveDir == ImGuiDir_Left && is_open)
|
||||||
|
|||||||
Reference in New Issue
Block a user