From cce2c2426266bceb0756a5182402e69a5b995b2f Mon Sep 17 00:00:00 2001 From: Paddle Date: Mon, 8 Jan 2024 10:51:50 +0100 Subject: [PATCH] Core: tree: prevent object replacement when dragging --- src/Gui/Tree.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index fe830d468f..30148e512b 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -1747,7 +1747,8 @@ void TreeWidget::dragMoveEvent(QDragMoveEvent* event) // let the view provider decide to accept the object or ignore it if (da != Qt::LinkAction && !vp->canDropObjectEx(obj, owner, subname.c_str(), item->mySubs)) { - if (event->possibleActions() & Qt::LinkAction) { + // Cause unexpected bugs : https://github.com/FreeCAD/FreeCAD/issues/11676 + /*if (event->possibleActions() & Qt::LinkAction) { if (items.size() > 1) { TREE_TRACE("Cannot replace with more than one object"); event->ignore(); @@ -1760,7 +1761,7 @@ void TreeWidget::dragMoveEvent(QDragMoveEvent* event) } event->setDropAction(Qt::LinkAction); return; - } + }*/ TREE_TRACE("cannot drop " << obj->getFullName() << ' ' << (owner ? owner->getFullName() : "") << '.' << subname);