diff --git a/src/domain/UBGraphicsDelegateFrame.cpp b/src/domain/UBGraphicsDelegateFrame.cpp index af4cf3ae..c46fa2a6 100644 --- a/src/domain/UBGraphicsDelegateFrame.cpp +++ b/src/domain/UBGraphicsDelegateFrame.cpp @@ -401,7 +401,7 @@ void UBGraphicsDelegateFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event) qreal width = delegated()->boundingRect().width() * mTotalScaleX; qreal height = delegated()->boundingRect().height() * mTotalScaleY; - if (mOperationMode == Scaling) + if (mOperationMode == Scaling) { if(!rotating()) { @@ -443,8 +443,8 @@ void UBGraphicsDelegateFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event) mScaleY = scaleY; } } - }else if (resizingLeft() || resizingRight()) - { + } + else if (resizingLeft() || resizingRight()){ if(width != 0){ qreal scaleX = 0.0; if(resizingLeft()){ diff --git a/src/domain/UBGraphicsItemTransformUndoCommand.h b/src/domain/UBGraphicsItemTransformUndoCommand.h index 396f587e..86e4d0d7 100644 --- a/src/domain/UBGraphicsItemTransformUndoCommand.h +++ b/src/domain/UBGraphicsItemTransformUndoCommand.h @@ -30,7 +30,6 @@ #include -#include "UBResizableGraphicsItem.h" #include "UBUndoCommand.h" diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index 56266e90..192c21e5 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -257,9 +257,7 @@ qreal UBZLayerController::changeZLevelTo(QGraphicsItem *item, moveDestination de foreach (QGraphicsItem *iitem, sortedItems.values()) { if (iitem) - iitem != item - ? qDebug() << "current value" << iitem->zValue() - : qDebug() << "marked value" << QString::number(iitem->zValue(), 'f'); + iitem != item ? qDebug() << "current value" << iitem->zValue() : qDebug() << "marked value" << QString::number(iitem->zValue(), 'f'); } //Return new z value assigned to item diff --git a/src/domain/UBGraphicsTextItemDelegate.cpp b/src/domain/UBGraphicsTextItemDelegate.cpp index c9070b2c..ca3faa21 100644 --- a/src/domain/UBGraphicsTextItemDelegate.cpp +++ b/src/domain/UBGraphicsTextItemDelegate.cpp @@ -195,6 +195,11 @@ void UBGraphicsTextItemDelegate::createControls() button->setFlag(QGraphicsItem::ItemIsSelectable, true); } + // Claudio: on changing the zvlaue the frame is updated updateSelectionFrame and + // the default value for the operation mode is set (scaling). This isn't the right + // mode for text so we call that here. + frame()->setOperationMode(UBGraphicsDelegateFrame::Resizing); + }