|
|
|
@ -326,11 +326,14 @@ void UBDocumentTreeWidget::dropEvent(QDropEvent *event) |
|
|
|
|
QString source = scene->document()->persistencePath() + "/" + relativeFile.toString(); |
|
|
|
|
QString target = targetDocProxy->persistencePath() + "/" + relativeFile.toString(); |
|
|
|
|
|
|
|
|
|
if(QFileInfo(source).isDir()) |
|
|
|
|
Q_ASSERT(UBFileSystemUtils::copyDir(source,target)); |
|
|
|
|
else{ |
|
|
|
|
QFileInfo fi(target); |
|
|
|
|
QDir d = fi.dir(); |
|
|
|
|
|
|
|
|
|
d.mkpath(d.absolutePath()); |
|
|
|
|
QFile::copy(source, target); |
|
|
|
|
Q_ASSERT(QFile::copy(source, target)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
UBPersistenceManager::persistenceManager()->insertDocumentSceneAt(targetDocProxy, sceneClone, targetDocProxy->pageCount()); |
|
|
|
|