Commit 27241430 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.dragAndDrop: crashfix

dragNode might be invalid!
parent 40f552c1
......@@ -225,9 +225,11 @@ void DragTool::dropEvent(QGraphicsSceneDragDropEvent * event)
} catch (RewritingException &e) {
QMessageBox::warning(0, "Error", e.description());
}
QList<QmlItemNode> nodeList;
nodeList.append(m_dragNode);
view()->setSelectedQmlItemNodes(nodeList);
if (m_dragNode.isValid()) {
QList<QmlItemNode> nodeList;
nodeList.append(m_dragNode);
view()->setSelectedQmlItemNodes(nodeList);
}
m_dragNode = ModelNode();
view()->changeToSelectionTool();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment