TextItem hotfix

preferencesAboutTextFull
Ivan Ilyin 12 years ago
parent a7aec5e891
commit 687da649b4
  1. 6
      src/domain/UBGraphicsDelegateFrame.cpp
  2. 16
      src/domain/UBGraphicsItemDelegate.cpp

@ -583,9 +583,9 @@ void UBGraphicsDelegateFrame::positionHandles()
{ {
QRectF itemRect = delegated()->boundingRect(); QRectF itemRect = delegated()->boundingRect();
// if (mDelegate->getToolBarItem()->isVisibleOnBoard() if (mDelegate->getToolBarItem()->isVisibleOnBoard()
// && mDelegate->getToolBarItem()->isShifting()) && mDelegate->getToolBarItem()->isShifting())
// itemRect.setHeight(itemRect.height() + mDelegate->getToolBarItem()->rect().height() * mDelegate->antiScaleRatio() * 1.1); itemRect.setHeight(itemRect.height() + mDelegate->getToolBarItem()->rect().height() * mDelegate->antiScaleRatio() * 1.1);
QTransform itemTransform = delegated()->sceneTransform(); QTransform itemTransform = delegated()->sceneTransform();
QPointF topLeft = itemTransform.map(itemRect.topLeft()); QPointF topLeft = itemTransform.map(itemRect.topLeft());

@ -118,7 +118,7 @@ UBGraphicsItemDelegate::UBGraphicsItemDelegate(QGraphicsItem* pDelegated, QObjec
void UBGraphicsItemDelegate::init() void UBGraphicsItemDelegate::init()
{ {
//mToolBarItem = new UBGraphicsToolBarItem(delegated()); mToolBarItem = new UBGraphicsToolBarItem(delegated());
mFrame = new UBGraphicsDelegateFrame(this, QRectF(0, 0, 0, 0), mFrameWidth, mRespectRatio); mFrame = new UBGraphicsDelegateFrame(this, QRectF(0, 0, 0, 0), mFrameWidth, mRespectRatio);
mFrame->hide(); mFrame->hide();
@ -333,17 +333,17 @@ void UBGraphicsItemDelegate::positionHandles()
updateButtons(true); updateButtons(true);
// if (mToolBarItem->isVisibleOnBoard()) if (mToolBarItem->isVisibleOnBoard())
// { {
// updateToolBar(); updateToolBar();
// mToolBarItem->show(); mToolBarItem->show();
// } }
} else { } else {
foreach(DelegateButton* button, mButtons) foreach(DelegateButton* button, mButtons)
button->hide(); button->hide();
mFrame->hide(); mFrame->hide();
// mToolBarItem->hide(); mToolBarItem->hide();
} }
} }
@ -383,7 +383,7 @@ void UBGraphicsItemDelegate::remove(bool canUndo)
scene->removeItem(mFrame); scene->removeItem(mFrame);
scene->removeItem(mDelegated); scene->removeItem(mDelegated);
//scene->removeItem(mToolBarItem); scene->removeItem(mToolBarItem);
if (canUndo) if (canUndo)
{ {

Loading…
Cancel
Save