@ -5270,9 +5270,11 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
{
if ( pressed )
{
const float arrow_x1 = text_pos . x - text_offset_x ;
const float arrow_x2 = arrow_x1 + g . FontSize + padding . x * 2.0f ;
toggled = ! ( flags & ( ImGuiTreeNodeFlags_OpenOnArrow | ImGuiTreeNodeFlags_OpenOnDoubleClick ) ) | | ( g . NavActivateId = = id ) ;
if ( flags & ImGuiTreeNodeFlags_OpenOnArrow )
toggled | = IsMouseHoveringRect ( interact_bb. Min , ImVec2 ( interact_bb . Min . x + text_offset_x , interact_bb . Max . y ) ) & & ( ! g . NavDisableMouseHover ) ;
toggled | = IsMouseHoveringRect ( ImVec2( arrow_x1 , interact_bb . Min . y ) , ImVec2 ( arrow_x2 , interact_bb . Max . y ) ) & & ( ! g . NavDisableMouseHover ) ;
if ( flags & ImGuiTreeNodeFlags_OpenOnDoubleClick )
toggled | = g . IO . MouseDoubleClicked [ 0 ] ;
if ( g . DragDropActive & & is_open ) // When using Drag and Drop "hold to open" we keep the node highlighted after opening, but never close it again.