Merge branch 'master' of github.com:Sankore/Sankore-3.1

preferencesAboutTextFull
Claudio Valerio 13 years ago
commit 0aa621269d
  1. 3
      src/domain/UBGraphicsItemDelegate.cpp
  2. 11
      src/domain/UBGraphicsStrokesGroup.cpp

@ -419,9 +419,6 @@ bool UBGraphicsItemDelegate::isLocked()
void UBGraphicsItemDelegate::duplicate()
{
// TODO UB 4.x .. rewrite .. .this is absurde ... we know what we are duplicating
UBApplication::boardController->copy();
UBApplication::boardController->paste();
UBApplication::boardController->duplicateItem(dynamic_cast<UBItem*>(delegated()));
}

@ -1,5 +1,7 @@
#include "UBGraphicsStrokesGroup.h"
#include "domain/UBGraphicsPolygonItem.h"
#include "core/memcheck.h"
UBGraphicsStrokesGroup::UBGraphicsStrokesGroup(QGraphicsItem *parent):QGraphicsItemGroup(parent)
@ -63,6 +65,15 @@ UBItem* UBGraphicsStrokesGroup::deepCopy() const
{
UBGraphicsStrokesGroup* copy = new UBGraphicsStrokesGroup();
QList<QGraphicsItem*> chl = childItems();
foreach(QGraphicsItem *child, chl)
{
UBGraphicsPolygonItem *polygon = dynamic_cast<UBGraphicsPolygonItem*>(child);
if (polygon)
copy->addToGroup(dynamic_cast<QGraphicsItem*>(polygon->deepCopy()));
}
copyItemParameters(copy);
return copy;

Loading…
Cancel
Save