Duplicated items is shifted now.

preferencesAboutTextFull
Aleksei Kanash 13 years ago
parent 424f91dbb2
commit cdf2eab0b2
  1. 7
      src/board/UBBoardController.cpp

@ -544,7 +544,8 @@ void UBBoardController::duplicateItem(UBItem *item)
QGraphicsItem *commonItem = dynamic_cast<QGraphicsItem*>(item);
if (commonItem)
{
itemPos = commonItem->pos();
qreal shifting = UBSettings::settings()->objectFrameWidth;
itemPos = commonItem->pos() + QPointF(shifting,shifting);
itemSize = commonItem->boundingRect().size();
}
@ -612,6 +613,10 @@ void UBBoardController::duplicateItem(UBItem *item)
{
createdItem->setSourceUrl(item->sourceUrl());
item->copyItemParameters(createdItem);
QGraphicsItem *createdGitem = dynamic_cast<QGraphicsItem*>(createdItem);
if (createdGitem)
createdGitem->setPos(itemPos);
}
}

Loading…
Cancel
Save