##// END OF EJS Templates
fix some wrong drag&drop behavior appearing on mac
trabillard -
r979:a300a0876631
parent child
Show More
@@ -123,7 +123,9 struct VisualizationDragDropContainer::VisualizationDragDropContainerPrivate {
123 123
124 124 bool cursorIsInContainer(QWidget *container) const
125 125 {
126 return container->isAncestorOf(sqpApp->widgetAt(QCursor::pos()));
126 auto widgetUnderMouse = sqpApp->widgetAt(QCursor::pos());
127 return container->isAncestorOf(widgetUnderMouse) && widgetUnderMouse != container
128 && sqpApp->dragDropHelper().placeHolder().isAncestorOf(widgetUnderMouse);
127 129 }
128 130
129 131 int countDragWidget(const QWidget *parent, bool onlyVisible = false) const
@@ -391,7 +393,7 void VisualizationDragDropContainer::VisualizationDragDropContainerPrivate::find
391 393 auto &helper = sqpApp->dragDropHelper();
392 394
393 395 auto absPos = container->mapToGlobal(pos);
394 auto isOnPlaceHolder = sqpApp->widgetAt(absPos) == &(helper.placeHolder());
396 auto isOnPlaceHolder = helper.placeHolder().isAncestorOf(sqpApp->widgetAt(absPos));
395 397
396 398 if (countDragWidget(container, true) == 0) {
397 399 // Drop on an empty container, just add the placeHolder at the top
General Comments 1
Under Review
author

Auto status change to "Under Review"

You need to be logged in to leave comments. Login now