Commit 687da649 authored by Ivan Ilyin's avatar Ivan Ilyin

TextItem hotfix

parent a7aec5e8
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment