Group container copy scene

preferencesAboutTextFull
Ilia Ryabokon 11 years ago
parent 559c0bcdf2
commit 7a4a2d0f6e
  1. 8
      src/domain/UBGraphicsGroupContainerItem.cpp
  2. 4
      src/gui/UBDocumentTreeWidget.cpp

@ -205,6 +205,14 @@ UBGraphicsGroupContainerItem *UBGraphicsGroupContainerItem::deepCopy() const
copyItemParameters(copy); copyItemParameters(copy);
foreach (QGraphicsItem *it, childItems()) {
UBItem *childAsUBItem = dynamic_cast<UBItem*>(it);
if (childAsUBItem) {
QGraphicsItem *cloneItem = dynamic_cast<QGraphicsItem*>(childAsUBItem->deepCopy());
copy->addToGroup(cloneItem);
}
}
return copy; return copy;
} }

@ -22,9 +22,6 @@
* along with OpenBoard. If not, see <http://www.gnu.org/licenses/>. * along with OpenBoard. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "UBDocumentTreeWidget.h" #include "UBDocumentTreeWidget.h"
#include "document/UBDocumentProxy.h" #include "document/UBDocumentProxy.h"
@ -323,6 +320,7 @@ void UBDocumentTreeWidget::dropEvent(QDropEvent *event)
if (scene) if (scene)
{ {
UBGraphicsScene* sceneClone = scene->sceneDeepCopy(); UBGraphicsScene* sceneClone = scene->sceneDeepCopy();
// UBGraphicsScene* sceneClone = scene;
UBDocumentProxy *targetDocProxy = targetProxyTreeItem->proxy(); UBDocumentProxy *targetDocProxy = targetProxyTreeItem->proxy();

Loading…
Cancel
Save