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