on zlevel changed the frame operation mode is reset to resize instead of scale

preferencesAboutTextFull
-f 11 years ago
parent 5cf4320707
commit dabaca53ae
  1. 4
      src/domain/UBGraphicsDelegateFrame.cpp
  2. 1
      src/domain/UBGraphicsItemTransformUndoCommand.h
  3. 4
      src/domain/UBGraphicsScene.cpp
  4. 5
      src/domain/UBGraphicsTextItemDelegate.cpp

@ -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()){

@ -30,7 +30,6 @@
#include <QtGui>
#include "UBResizableGraphicsItem.h"
#include "UBUndoCommand.h"

@ -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

@ -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);
}

Loading…
Cancel
Save