forked from qt-creator/qt-creator
QmlDesigner: reduce complexity in DragTool::dragMoveEvent
Change-Id: Icacf450bfdb6dac277ec37d1e1c61145035b3913 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
@@ -334,9 +334,7 @@ void DragTool::createDragNode(const QMimeData *mimeData, const QPointF &scenePos
|
|||||||
|
|
||||||
void DragTool::dragMoveEvent(const QList<QGraphicsItem*> &itemList, QGraphicsSceneDragDropEvent *event)
|
void DragTool::dragMoveEvent(const QList<QGraphicsItem*> &itemList, QGraphicsSceneDragDropEvent *event)
|
||||||
{
|
{
|
||||||
if (!m_blockMove) {
|
if (!m_blockMove && !m_isAborted && canHandleMimeData(event->mimeData())) {
|
||||||
if (!m_isAborted) {
|
|
||||||
if (canHandleMimeData(event->mimeData())) {
|
|
||||||
event->accept();
|
event->accept();
|
||||||
if (m_dragNode.isValid()) {
|
if (m_dragNode.isValid()) {
|
||||||
FormEditorItem *targetContainerItem = targetContainerOrRootItem(itemList);
|
FormEditorItem *targetContainerItem = targetContainerOrRootItem(itemList);
|
||||||
@@ -349,12 +347,10 @@ void DragTool::dragMoveEvent(const QList<QGraphicsItem*> &itemList, QGraphicsSce
|
|||||||
} else {
|
} else {
|
||||||
createDragNode(event->mimeData(), event->scenePos(), itemList);
|
createDragNode(event->mimeData(), event->scenePos(), itemList);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else{
|
} else{
|
||||||
event->ignore();
|
event->ignore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void DragTool::end()
|
void DragTool::end()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user