Docking: Internals: added ImGuiDockNodeFlags_NoUndocking. (#2999, #6823, #6780)

This commit is contained in:
ocornut
2023-09-15 20:15:13 +02:00
parent 14f8b76c1a
commit 1612813114
3 changed files with 7 additions and 4 deletions

View File

@@ -8639,7 +8639,8 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
}
// Extract a Dockable window out of it's tab bar
if (docked_window != NULL && !(docked_window->Flags & ImGuiWindowFlags_NoMove))
const bool can_undock = docked_window != NULL && !(docked_window->Flags & ImGuiWindowFlags_NoMove) && !(node->MergedFlags & ImGuiDockNodeFlags_NoUndocking);
if (can_undock)
{
// We use a variable threshold to distinguish dragging tabs within a tab bar and extracting them out of the tab bar
bool undocking_tab = (g.DragDropActive && g.DragDropPayload.SourceId == id);