@@ -378,7 +378,7 @@ void QgsComposerMouseHandles::mouseMoveEvent( QGraphicsSceneMouseEvent* event )
378
378
if ( mIsDragging )
379
379
{
380
380
// currently dragging a selection
381
- dragMouseMove ( event->lastScenePos (), shiftModifier );
381
+ dragMouseMove ( event->lastScenePos (), shiftModifier, controlModifier );
382
382
}
383
383
else if ( mIsResizing )
384
384
{
@@ -499,7 +499,7 @@ void QgsComposerMouseHandles::mousePressEvent( QGraphicsSceneMouseEvent* event )
499
499
500
500
}
501
501
502
- void QgsComposerMouseHandles::dragMouseMove ( const QPointF& currentPosition, bool lockMovement )
502
+ void QgsComposerMouseHandles::dragMouseMove ( const QPointF& currentPosition, bool lockMovement, bool preventSnap )
503
503
{
504
504
if ( !mComposition )
505
505
{
@@ -513,8 +513,18 @@ void QgsComposerMouseHandles::dragMouseMove( const QPointF& currentPosition, boo
513
513
// find target position before snapping (in scene coordinates)
514
514
QPointF upperLeftPoint ( mBeginHandlePos .x () + moveX, mBeginHandlePos .y () + moveY );
515
515
516
- // snap to grid and guides
517
- QPointF snappedLeftPoint = snapPoint ( upperLeftPoint, QgsComposerMouseHandles::Item );
516
+ QPointF snappedLeftPoint;
517
+ if ( !preventSnap )
518
+ {
519
+ // snap to grid and guides
520
+ snappedLeftPoint = snapPoint ( upperLeftPoint, QgsComposerMouseHandles::Item );
521
+ }
522
+ else
523
+ {
524
+ // no snapping
525
+ snappedLeftPoint = upperLeftPoint;
526
+ deleteAlignItems ();
527
+ }
518
528
519
529
// calculate total shift for item from beginning of drag operation to current position
520
530
double moveRectX = snappedLeftPoint.x () - mBeginHandlePos .x ();
0 commit comments