##// END OF EJS Templates
Improves drag&drop with spectro
trabillard -
r1125:3bc886701554
parent child
Show More
@@ -442,8 +442,10 bool VisualizationDragDropContainer::VisualizationDragDropContainerPrivate::find
442
442
443 auto dragWidgetHovered = getChildDragWidgetAt(container, pos);
443 auto dragWidgetHovered = getChildDragWidgetAt(container, pos);
444
444
445 if (canInsert && (isOnTop || isOnBottom || !canMerge)) {
445 auto acceptMerge = m_AcceptDragWidgetFun(dragWidgetHovered, mimeData);
446 if (isOnBottom) {
446
447 if (canInsert && (isOnTop || isOnBottom || !canMerge || !acceptMerge)) {
448 if (posY > (dropIndex + 1) * graphHeight - graphHeight / 2.0) {
447 dropIndex += 1;
449 dropIndex += 1;
448 }
450 }
449
451
@@ -470,13 +472,7 bool VisualizationDragDropContainer::VisualizationDragDropContainerPrivate::find
470 helper.removePlaceHolder();
472 helper.removePlaceHolder();
471 }
473 }
472
474
473 if (m_AcceptDragWidgetFun(dragWidgetHovered, mimeData)) {
475 helper.setHightlightedDragWidget(dragWidgetHovered);
474 helper.setHightlightedDragWidget(dragWidgetHovered);
475 return true;
476 }
477 else {
478 return false;
479 }
480 }
476 }
481 else {
477 else {
482 qCWarning(LOG_VisualizationDragDropContainer())
478 qCWarning(LOG_VisualizationDragDropContainer())
General Comments 4
Under Review
author

Auto status change to "Under Review"

Approved

Status change > Approved

Approved

Status change > Approved

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