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