mirror of
https://github.com/ocornut/imgui.git
synced 2025-06-08 03:22:41 +08:00
TreeNode: fixed an issue where tree lines are not drawn on node opening frame. (#2920)
This commit is contained in:
parent
69e1fb50ca
commit
b7ab2b7523
@ -6690,7 +6690,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
|
|||||||
if ((flags & ImGuiTreeNodeFlags_DrawLinesMask_) == 0)
|
if ((flags & ImGuiTreeNodeFlags_DrawLinesMask_) == 0)
|
||||||
flags |= g.Style.TreeLinesFlags;
|
flags |= g.Style.TreeLinesFlags;
|
||||||
const bool draw_tree_lines = (flags & (ImGuiTreeNodeFlags_DrawLinesFull | ImGuiTreeNodeFlags_DrawLinesToNodes)) && (frame_bb.Min.y < window->ClipRect.Max.y) && (g.Style.TreeLinesSize > 0.0f);
|
const bool draw_tree_lines = (flags & (ImGuiTreeNodeFlags_DrawLinesFull | ImGuiTreeNodeFlags_DrawLinesToNodes)) && (frame_bb.Min.y < window->ClipRect.Max.y) && (g.Style.TreeLinesSize > 0.0f);
|
||||||
if (is_open && !(flags & ImGuiTreeNodeFlags_NoTreePushOnOpen))
|
if (!(flags & ImGuiTreeNodeFlags_NoTreePushOnOpen))
|
||||||
{
|
{
|
||||||
if ((flags & ImGuiTreeNodeFlags_NavLeftJumpsToParent) && !g.NavIdIsAlive)
|
if ((flags & ImGuiTreeNodeFlags_NavLeftJumpsToParent) && !g.NavIdIsAlive)
|
||||||
if (g.NavMoveDir == ImGuiDir_Left && g.NavWindow == window && NavMoveRequestButNoResultYet())
|
if (g.NavMoveDir == ImGuiDir_Left && g.NavWindow == window && NavMoveRequestButNoResultYet())
|
||||||
@ -6889,7 +6889,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
|
|||||||
TablePopBackgroundChannel();
|
TablePopBackgroundChannel();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (store_tree_node_stack_data && is_open)
|
if (is_open && store_tree_node_stack_data)
|
||||||
TreeNodeStoreStackData(flags, text_pos.x - text_offset_x); // Call before TreePushOverrideID()
|
TreeNodeStoreStackData(flags, text_pos.x - text_offset_x); // Call before TreePushOverrideID()
|
||||||
if (is_open && !(flags & ImGuiTreeNodeFlags_NoTreePushOnOpen))
|
if (is_open && !(flags & ImGuiTreeNodeFlags_NoTreePushOnOpen))
|
||||||
TreePushOverrideID(id); // Could use TreePush(label) but this avoid computing twice
|
TreePushOverrideID(id); // Could use TreePush(label) but this avoid computing twice
|
||||||
|
Loading…
Reference in New Issue
Block a user