From 1b263f6ab0ae6cbf55d83f207802d7994687f826 Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 11 Dec 2018 19:37:22 +0100 Subject: [PATCH] Tabs: Fixed support for drag and drop ImGuiButtonFlags_PressedOnDragDropHold. (#261) incorrectly missing from the merge from Docking branch. --- imgui_widgets.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index d08583a1..672fa5ca 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -6343,6 +6343,8 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open, // Click to Select a tab ImGuiButtonFlags button_flags = (ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_AllowItemOverlap); + if (g.DragDropActive) + button_flags |= ImGuiButtonFlags_PressedOnDragDropHold; bool hovered, held; bool pressed = ButtonBehavior(bb, id, &hovered, &held, button_flags); hovered |= (g.HoveredId == id);