mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
TreeNode: node with the ImGuiTreeNodeFlags_Leaf flag correctly disable highlight when DragDrop is active. (#143, #581)
This commit is contained in:
parent
49eed6e2d1
commit
563d04fdb1
@ -6702,7 +6702,8 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
|
|||||||
// - OpenOnArrow .................... single-click on arrow to open
|
// - OpenOnArrow .................... single-click on arrow to open
|
||||||
// - OpenOnDoubleClick|OpenOnArrow .. single-click on arrow or double-click anywhere to open
|
// - OpenOnDoubleClick|OpenOnArrow .. single-click on arrow or double-click anywhere to open
|
||||||
ImGuiButtonFlags button_flags = ImGuiButtonFlags_NoKeyModifiers | ((flags & ImGuiTreeNodeFlags_AllowItemOverlap) ? ImGuiButtonFlags_AllowItemOverlap : 0);
|
ImGuiButtonFlags button_flags = ImGuiButtonFlags_NoKeyModifiers | ((flags & ImGuiTreeNodeFlags_AllowItemOverlap) ? ImGuiButtonFlags_AllowItemOverlap : 0);
|
||||||
button_flags |= ImGuiButtonFlags_PressedOnDragDropHold;
|
if (!(flags & ImGuiTreeNodeFlags_Leaf))
|
||||||
|
button_flags |= ImGuiButtonFlags_PressedOnDragDropHold;
|
||||||
if (flags & ImGuiTreeNodeFlags_OpenOnDoubleClick)
|
if (flags & ImGuiTreeNodeFlags_OpenOnDoubleClick)
|
||||||
button_flags |= ImGuiButtonFlags_PressedOnDoubleClick | ((flags & ImGuiTreeNodeFlags_OpenOnArrow) ? ImGuiButtonFlags_PressedOnClickRelease : 0);
|
button_flags |= ImGuiButtonFlags_PressedOnDoubleClick | ((flags & ImGuiTreeNodeFlags_OpenOnArrow) ? ImGuiButtonFlags_PressedOnClickRelease : 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user