Commit d50fb9a1 authored by Claudio Valerio's avatar Claudio Valerio

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

parents 8028185f 1f9ac968
......@@ -1823,8 +1823,7 @@ UBGraphicsWidgetItem *UBBoardController::addW3cWidget(const QUrl &pUrl, const QP
tmpItem->widgetWebView()->takeSnapshot().save(snapshotPath, "PNG");
}
return 0;
return w3cWidgetItem;
}
void UBBoardController::cut()
......
......@@ -155,7 +155,7 @@ void UBLibraryController::routeItem(QString& pItem, QString pMiddleDirectory)
}
destination = UBFileSystemUtils::normalizeFilePath(destination + "/" + itemToRoute.fileName());
QFile::copy(pItem, destination);
UBFileSystemUtils::copyFile(QUrl(pItem).toLocalFile(), destination, false);
}
}
......
......@@ -93,6 +93,7 @@ UBItem* UBGraphicsAudioItem::deepCopy() const
QUrl audioUrl = this->mediaFileUrl();
UBGraphicsAudioItem *copy = new UBGraphicsAudioItem(audioUrl, parentItem());
connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), copy, SLOT(activeSceneChanged()));
copy->setPos(this->pos());
// copy->setZValue(this->zValue());
......
......@@ -67,6 +67,8 @@ UBItem* UBGraphicsVideoItem::deepCopy() const
UBGraphicsVideoItem *copy = new UBGraphicsVideoItem(videoUrl, parentItem());
connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), copy, SLOT(activeSceneChanged()));
copy->setPos(this->pos());
// copy->setZValue(this->zValue());
UBGraphicsItem::assignZValue(copy, this->zValue());
......
......@@ -362,16 +362,8 @@ void UBLibraryWidget::dropEvent(QDropEvent *event)
if (pMimeData->hasUrls()){
QList<QUrl> urlList = pMimeData->urls();
for (int i = 0; i < urlList.size() && i < 32; ++i){
QString filePath;
QString crntPath = urlList.at(i).toString();
if(crntPath.startsWith("file:") || crntPath.startsWith("/")){
filePath = QUrl(crntPath).toLocalFile();
}else{
filePath = crntPath;
}
mLibraryController->importItemOnLibrary(filePath);
mLibraryController->importItemOnLibrary(crntPath);
bDropAccepted = true;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment