Commit ef5d054d authored by Marco Bubke's avatar Marco Bubke

QmlDesigner.FormEditor: Skip all move events between a 30 ms time frame

To many move events will stall the local sockets.

Change-Id: Iec9a072a6c2e217d19c656d5596c40167ca97675
Reviewed-on: http://codereview.qt.nokia.com/2222Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@nokia.com>
parent 33c96800
......@@ -275,12 +275,17 @@ void FormEditorScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
void FormEditorScene::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
if (event->buttons())
currentTool()->mouseMoveEvent(removeLayerItems(items(event->scenePos())), event);
else
currentTool()->hoverMoveEvent(removeLayerItems(items(event->scenePos())), event);
static QTime time;
event->accept();
if (time.elapsed() > 30) {
time.restart();
if (event->buttons())
currentTool()->mouseMoveEvent(removeLayerItems(items(event->scenePos())), event);
else
currentTool()->hoverMoveEvent(removeLayerItems(items(event->scenePos())), event);
event->accept();
}
}
void FormEditorScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
......
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