QmlDesigner: allow aborting drag and drop with Escape

Also allows aborting the move tool.

Reviewed-by: Marco Bubke
Task-number: QTCREATORBUG-4322
This commit is contained in:
Thomas Hartmann
2011-05-10 15:09:26 +02:00
parent 4b19473a9b
commit df6f809927
8 changed files with 52 additions and 7 deletions

View File

@@ -170,7 +170,10 @@ void MoveTool::keyPressEvent(QKeyEvent *event)
case Qt::Key_Down: m_moveManipulator.moveBy(0.0, moveStep); break;
}
if (event->key() == Qt::Key_Escape && !m_movingItems.isEmpty()) {
event->accept();
view()->changeToSelectionTool();
}
}
void MoveTool::keyReleaseEvent(QKeyEvent *keyEvent)