From 9df8c0f82330e88079a895b6f43112c493a8d498 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Tue, 14 Oct 2014 17:55:39 +0200 Subject: [PATCH] removed bad fix. Duplication of imported image --- src/adaptors/UBImportImage.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/adaptors/UBImportImage.cpp b/src/adaptors/UBImportImage.cpp index a579ad77..26e9d0bb 100644 --- a/src/adaptors/UBImportImage.cpp +++ b/src/adaptors/UBImportImage.cpp @@ -101,24 +101,13 @@ QList UBImportImage::import(const QUuid& uuid, const QString& f pixmapItem->setPixmap(pix); result << pixmapItem; - QString documentPath = UBApplication::boardController->selectedDocument()->persistencePath(); - QString fileName = UBPersistenceManager::imageDirectory + "/" + pixmapItem->uuid().toString() + ".png"; - QString path = documentPath + "/" + fileName; - if (!QFile::exists(path)) - { - QDir dir; - dir.mkdir(documentPath + "/" + UBPersistenceManager::imageDirectory); - - pixmapItem->pixmap().toImage().save(path, "PNG"); - } - return result; } void UBImportImage::placeImportedItemToScene(UBGraphicsScene* scene, UBGraphicsItem* item) { UBGraphicsPixmapItem* pixmapItem = (UBGraphicsPixmapItem*)item; - + UBGraphicsPixmapItem* sceneItem = scene->addPixmap(pixmapItem->pixmap(), NULL, QPointF(0, 0)); scene->setAsBackgroundObject(sceneItem, true);