mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-21 01:44:21 +00:00
Docking: Removed unnecessary ImGuiTabItemFlags_DockedWindow internal flag.
This commit is contained in:
parent
e1143377c2
commit
578e15f006
3 changed files with 4 additions and 5 deletions
|
|
@ -6507,7 +6507,7 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
|||
{
|
||||
// Drag and drop: re-order tabs
|
||||
float drag_distance_from_edge_x = 0.0f;
|
||||
if (!g.DragDropActive && ((tab_bar->Flags & ImGuiTabBarFlags_Reorderable) || (flags & ImGuiTabItemFlags_DockedWindow)))
|
||||
if (!g.DragDropActive && ((tab_bar->Flags & ImGuiTabBarFlags_Reorderable) || (docked_window != NULL)))
|
||||
{
|
||||
// While moving a tab it will jump on the other side of the mouse, so we also test for MouseDelta.x
|
||||
if (g.IO.MouseDelta.x < 0.0f && g.IO.MousePos.x < bb.Min.x)
|
||||
|
|
@ -6525,7 +6525,7 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
|||
}
|
||||
|
||||
// Extract a Dockable window out of it's tab bar
|
||||
if (flags & ImGuiTabItemFlags_DockedWindow)
|
||||
if (docked_window != NULL)
|
||||
{
|
||||
// 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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue