|
@@ -10,7 +10,7 @@
|
|
|
// - FAQ ........................ https://dearimgui.com/faq (in repository as docs/FAQ.md)
|
|
|
// - Homepage ................... https://github.com/ocornut/imgui
|
|
|
// - Releases & changelog ....... https://github.com/ocornut/imgui/releases
|
|
|
-// - Gallery .................... https://github.com/ocornut/imgui/issues/6897 (please post your screenshots/video there!)
|
|
|
+// - Gallery .................... https://github.com/ocornut/imgui/issues/7503 (please post your screenshots/video there!)
|
|
|
// - Wiki ....................... https://github.com/ocornut/imgui/wiki (lots of good stuff there)
|
|
|
// - Getting Started https://github.com/ocornut/imgui/wiki/Getting-Started (how to integrate in an existing app by adding ~25 lines of code)
|
|
|
// - Third-party Extensions https://github.com/ocornut/imgui/wiki/Useful-Extensions (ImPlot & many more)
|
|
@@ -12966,6 +12966,7 @@ bool ImGui::BeginDragDropSource(ImGuiDragDropFlags flags)
|
|
|
source_drag_active = true;
|
|
|
}
|
|
|
|
|
|
+ IM_ASSERT(g.DragDropWithinTarget == false); // Can't nest BeginDragDropSource() and BeginDragDropTarget()
|
|
|
if (source_drag_active)
|
|
|
{
|
|
|
if (!g.DragDropActive)
|
|
@@ -13081,7 +13082,7 @@ bool ImGui::BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id)
|
|
|
if (window->SkipItems)
|
|
|
return false;
|
|
|
|
|
|
- IM_ASSERT(g.DragDropWithinTarget == false);
|
|
|
+ IM_ASSERT(g.DragDropWithinTarget == false && g.DragDropWithinSource == false); // Can't nest BeginDragDropSource() and BeginDragDropTarget()
|
|
|
g.DragDropTargetRect = bb;
|
|
|
g.DragDropTargetClipRect = window->ClipRect; // May want to be overriden by user depending on use case?
|
|
|
g.DragDropTargetId = id;
|
|
@@ -13116,7 +13117,7 @@ bool ImGui::BeginDragDropTarget()
|
|
|
if (g.DragDropPayload.SourceId == id)
|
|
|
return false;
|
|
|
|
|
|
- IM_ASSERT(g.DragDropWithinTarget == false);
|
|
|
+ IM_ASSERT(g.DragDropWithinTarget == false && g.DragDropWithinSource == false); // Can't nest BeginDragDropSource() and BeginDragDropTarget()
|
|
|
g.DragDropTargetRect = display_rect;
|
|
|
g.DragDropTargetClipRect = (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_HasClipRect) ? g.LastItemData.ClipRect : window->ClipRect;
|
|
|
g.DragDropTargetId = id;
|