Removed dirty code

preferencesAboutTextFull
shibakaneki 12 years ago
parent 667be75e61
commit 22f36bed9d
  1. 6
      src/board/UBBoardController.cpp
  2. 2
      src/board/UBBoardController.h
  3. 2
      src/domain/UBGraphicsItemDelegate.cpp

@ -533,7 +533,7 @@ void UBBoardController::duplicateScene()
duplicateScene(mActiveSceneIndex); duplicateScene(mActiveSceneIndex);
} }
void UBBoardController::duplicateItem(UBItem *item, QTransform trf) void UBBoardController::duplicateItem(UBItem *item)
{ {
if (!item) if (!item)
return; return;
@ -619,7 +619,7 @@ void UBBoardController::duplicateItem(UBItem *item, QTransform trf)
foreach(QGraphicsItem* pIt, children){ foreach(QGraphicsItem* pIt, children){
UBItem* pItem = dynamic_cast<UBItem*>(pIt); UBItem* pItem = dynamic_cast<UBItem*>(pIt);
if(NULL != pItem){ if(NULL != pItem){
duplicateItem(pItem, groupItem->transform()); // The duplication already copies the item parameters duplicateItem(pItem);
} }
} }
groupItem->setTransform(groupTransform); groupItem->setTransform(groupTransform);
@ -2190,7 +2190,7 @@ void UBBoardController::processMimeData(const QMimeData* pMimeData, const QPoint
{ {
QGraphicsItem* pItem = dynamic_cast<QGraphicsItem*>(item); QGraphicsItem* pItem = dynamic_cast<QGraphicsItem*>(item);
if(NULL != pItem){ if(NULL != pItem){
duplicateItem(item, pItem->transform()); duplicateItem(item);
} }
} }

@ -158,7 +158,7 @@ class UBBoardController : public UBDocumentContainer
void moveSceneToIndex(int source, int target); void moveSceneToIndex(int source, int target);
void duplicateScene(int index); void duplicateScene(int index);
void duplicateItem(UBItem *item, QTransform trf); void duplicateItem(UBItem *item);
void deleteScene(int index); void deleteScene(int index);
bool cacheIsVisible() {return mCacheWidgetIsEnabled;} bool cacheIsVisible() {return mCacheWidgetIsEnabled;}

@ -417,7 +417,7 @@ bool UBGraphicsItemDelegate::isLocked() const
void UBGraphicsItemDelegate::duplicate() void UBGraphicsItemDelegate::duplicate()
{ {
UBApplication::boardController->duplicateItem(dynamic_cast<UBItem*>(delegated()), delegated()->transform()); UBApplication::boardController->duplicateItem(dynamic_cast<UBItem*>(delegated()));
} }
void UBGraphicsItemDelegate::increaseZLevelUp() void UBGraphicsItemDelegate::increaseZLevelUp()

Loading…
Cancel
Save