|
|
|
@ -16600,7 +16600,8 @@ ImGuiDockNode* ImGui::DockNodeTreeFindVisibleNodeByPos(ImGuiDockNode* node, ImVe |
|
|
|
|
if (ImGuiDockNode* hovered_node = DockNodeTreeFindVisibleNodeByPos(node->ChildNodes[1], pos)) |
|
|
|
|
return hovered_node; |
|
|
|
|
|
|
|
|
|
return NULL; |
|
|
|
|
// This means we are hovering over the splitter/spacing of a parent node
|
|
|
|
|
return node; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
@ -17469,16 +17470,18 @@ void ImGui::BeginDockableDragDropTarget(ImGuiWindow* window) |
|
|
|
|
const bool do_preview = payload->IsPreview() || payload->IsDelivery(); |
|
|
|
|
if (do_preview && (node != NULL || dock_into_floating_window)) |
|
|
|
|
{ |
|
|
|
|
// If we have a non-leaf node it means we are hovering the border of a parent node, in which case only outer markers will appear.
|
|
|
|
|
ImGuiDockPreviewData split_inner; |
|
|
|
|
ImGuiDockPreviewData split_outer; |
|
|
|
|
ImGuiDockPreviewData* split_data = &split_inner; |
|
|
|
|
if (node && (node->ParentNode || node->IsCentralNode())) |
|
|
|
|
if (node && (node->ParentNode || node->IsCentralNode() || !node->IsLeafNode())) |
|
|
|
|
if (ImGuiDockNode* root_node = DockNodeGetRootNode(node)) |
|
|
|
|
{ |
|
|
|
|
DockNodePreviewDockSetup(window, root_node, payload_window, NULL, &split_outer, is_explicit_target, true); |
|
|
|
|
if (split_outer.IsSplitDirExplicit) |
|
|
|
|
split_data = &split_outer; |
|
|
|
|
} |
|
|
|
|
if (!node || node->IsLeafNode()) |
|
|
|
|
DockNodePreviewDockSetup(window, node, payload_window, NULL, &split_inner, is_explicit_target, false); |
|
|
|
|
if (split_data == &split_outer) |
|
|
|
|
split_inner.IsDropAllowed = false; |
|
|
|
@ -18614,7 +18617,7 @@ void ImGui::DebugNodeDockNode(ImGuiDockNode* node, const char* label) |
|
|
|
|
if (node->Windows.Size > 0) |
|
|
|
|
open = TreeNodeEx((void*)(intptr_t)node->ID, tree_node_flags, "%s 0x%04X%s: %d windows (vis: '%s')", label, node->ID, node->IsVisible ? "" : " (hidden)", node->Windows.Size, node->VisibleWindow ? node->VisibleWindow->Name : "NULL"); |
|
|
|
|
else |
|
|
|
|
open = TreeNodeEx((void*)(intptr_t)node->ID, tree_node_flags, "%s 0x%04X%s: %s split (vis: '%s')", label, node->ID, node->IsVisible ? "" : " (hidden)", (node->SplitAxis == ImGuiAxis_X) ? "horizontal" : (node->SplitAxis == ImGuiAxis_Y) ? "vertical" : "n/a", node->VisibleWindow ? node->VisibleWindow->Name : "NULL"); |
|
|
|
|
open = TreeNodeEx((void*)(intptr_t)node->ID, tree_node_flags, "%s 0x%04X%s: %s (vis: '%s')", label, node->ID, node->IsVisible ? "" : " (hidden)", (node->SplitAxis == ImGuiAxis_X) ? "horizontal split" : (node->SplitAxis == ImGuiAxis_Y) ? "vertical split" : "empty", node->VisibleWindow ? node->VisibleWindow->Name : "NULL"); |
|
|
|
|
if (!is_alive) { PopStyleColor(); } |
|
|
|
|
if (is_active && IsItemHovered()) |
|
|
|
|
if (ImGuiWindow* window = node->HostWindow ? node->HostWindow : node->VisibleWindow) |
|
|
|
|