Commit 1432af69 authored by Clément Fauconnier's avatar Clément Fauconnier

fixed a bug where addToWorkingDocument was not working with images, audios and videos

parent e963b7e8
......@@ -535,17 +535,10 @@ void UBBoardController::addScene(UBGraphicsScene* scene, bool replaceActiveIfEmp
{
foreach(QUrl relativeFile, scene->relativeDependencies())
{
QString source = scene->document()->persistencePath() + "/" + relativeFile.toString();
QString target = selectedDocument()->persistencePath() + "/" + relativeFile.toString();
if(QFileInfo(source).isDir())
UBFileSystemUtils::copyDir(source,target);
else{
QFileInfo fi(target);
QDir d = fi.dir();
d.mkpath(d.absolutePath());
QFile::copy(source, target);
}
QString source = scene->document()->persistencePath() + "/" + relativeFile.path();
QString destination = selectedDocument()->persistencePath() + "/" + relativeFile.path();
UBFileSystemUtils::copy(source, destination, 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