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();
// if (mDelegate->getToolBarItem()->isVisibleOnBoard()
// && mDelegate->getToolBarItem()->isShifting())
// itemRect.setHeight(itemRect.height() + mDelegate->getToolBarItem()->rect().height() * mDelegate->antiScaleRatio() * 1.1);
if (mDelegate->getToolBarItem()->isVisibleOnBoard()
&& mDelegate->getToolBarItem()->isShifting())
itemRect.setHeight(itemRect.height() + mDelegate->getToolBarItem()->rect().height() * mDelegate->antiScaleRatio() * 1.1);
QTransform itemTransform = delegated()->sceneTransform();
QPointF topLeft = itemTransform.map(itemRect.topLeft());

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

Loading…
Cancel
Save