Commit f8c66867 authored by Ludovic Fauvet's avatar Ludovic Fauvet

An event was dispatched before the new position was actually set

parent 4ee756ca
......@@ -27,10 +27,12 @@ QVariant GraphicsCursorItem::itemChange( GraphicsItemChange change, const QVaria
{
qreal posX = value.toPointF().x();
if ( posX < 0 ) posX = 0;
if ( posX != pos().x() )
emit cursorPositionChanged( posX );
return QPoint( posX, pos().y() );
}
if ( change == ItemPositionHasChanged )
{
emit cursorPositionChanged( pos().x() );
}
return QGraphicsItem::itemChange( change, value );
}
......
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