From 22f36bed9d6cc4e70c64e00c55fc08053701d822 Mon Sep 17 00:00:00 2001 From: shibakaneki Date: Thu, 6 Sep 2012 11:08:17 +0200 Subject: [PATCH] Removed dirty code --- src/board/UBBoardController.cpp | 6 +++--- src/board/UBBoardController.h | 2 +- src/domain/UBGraphicsItemDelegate.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index bd8b3a95..ea9e4f12 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -533,7 +533,7 @@ void UBBoardController::duplicateScene() duplicateScene(mActiveSceneIndex); } -void UBBoardController::duplicateItem(UBItem *item, QTransform trf) +void UBBoardController::duplicateItem(UBItem *item) { if (!item) return; @@ -619,7 +619,7 @@ void UBBoardController::duplicateItem(UBItem *item, QTransform trf) foreach(QGraphicsItem* pIt, children){ UBItem* pItem = dynamic_cast(pIt); if(NULL != pItem){ - duplicateItem(pItem, groupItem->transform()); // The duplication already copies the item parameters + duplicateItem(pItem); } } groupItem->setTransform(groupTransform); @@ -2190,7 +2190,7 @@ void UBBoardController::processMimeData(const QMimeData* pMimeData, const QPoint { QGraphicsItem* pItem = dynamic_cast(item); if(NULL != pItem){ - duplicateItem(item, pItem->transform()); + duplicateItem(item); } } diff --git a/src/board/UBBoardController.h b/src/board/UBBoardController.h index fb42565a..042ba24a 100644 --- a/src/board/UBBoardController.h +++ b/src/board/UBBoardController.h @@ -158,7 +158,7 @@ class UBBoardController : public UBDocumentContainer void moveSceneToIndex(int source, int target); void duplicateScene(int index); - void duplicateItem(UBItem *item, QTransform trf); + void duplicateItem(UBItem *item); void deleteScene(int index); bool cacheIsVisible() {return mCacheWidgetIsEnabled;} diff --git a/src/domain/UBGraphicsItemDelegate.cpp b/src/domain/UBGraphicsItemDelegate.cpp index b86ac541..4abeb1a2 100644 --- a/src/domain/UBGraphicsItemDelegate.cpp +++ b/src/domain/UBGraphicsItemDelegate.cpp @@ -417,7 +417,7 @@ bool UBGraphicsItemDelegate::isLocked() const void UBGraphicsItemDelegate::duplicate() { - UBApplication::boardController->duplicateItem(dynamic_cast(delegated()), delegated()->transform()); + UBApplication::boardController->duplicateItem(dynamic_cast(delegated())); } void UBGraphicsItemDelegate::increaseZLevelUp()