1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-02-01 03:30:06 +00:00

TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless. Tweak demo.

This commit is contained in:
omar 2018-05-14 23:36:37 +02:00
parent 99ff6fc7e4
commit 640c056602
3 changed files with 6 additions and 9 deletions

View file

@ -8109,7 +8109,7 @@ void ImGui::LogButtons()
bool ImGui::TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags)
{
if (flags & ImGuiTreeNodeFlags_Leaf)
return true;
return false;
// We only write to the tree storage if the user clicks (or explicitly use SetNextTreeNode*** functions)
ImGuiContext& g = *GImGui;