@@ -123,7 +123,9 struct VisualizationDragDropContainer::VisualizationDragDropContainerPrivate { | |||||
123 |
|
123 | |||
124 | bool cursorIsInContainer(QWidget *container) const |
|
124 | bool cursorIsInContainer(QWidget *container) const | |
125 | { |
|
125 | { | |
126 |
|
|
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 | int countDragWidget(const QWidget *parent, bool onlyVisible = false) const |
|
131 | int countDragWidget(const QWidget *parent, bool onlyVisible = false) const | |
@@ -391,7 +393,7 void VisualizationDragDropContainer::VisualizationDragDropContainerPrivate::find | |||||
391 | auto &helper = sqpApp->dragDropHelper(); |
|
393 | auto &helper = sqpApp->dragDropHelper(); | |
392 |
|
394 | |||
393 | auto absPos = container->mapToGlobal(pos); |
|
395 | auto absPos = container->mapToGlobal(pos); | |
394 |
auto isOnPlaceHolder = sqpApp->widgetAt(absPos) |
|
396 | auto isOnPlaceHolder = helper.placeHolder().isAncestorOf(sqpApp->widgetAt(absPos)); | |
395 |
|
397 | |||
396 | if (countDragWidget(container, true) == 0) { |
|
398 | if (countDragWidget(container, true) == 0) { | |
397 | // Drop on an empty container, just add the placeHolder at the top |
|
399 | // Drop on an empty container, just add the placeHolder at the top |
General Comments 0
You need to be logged in to leave comments.
Login now