Commit 7cd7af2d authored by Claudio Valerio's avatar Claudio Valerio

when page is deleted the pictures are deleted too

parent 4b00016c
...@@ -504,12 +504,12 @@ void UBBoardController::addScene(UBGraphicsScene* scene, bool replaceActiveIfEmp ...@@ -504,12 +504,12 @@ void UBBoardController::addScene(UBGraphicsScene* scene, bool replaceActiveIfEmp
QString target = selectedDocument()->persistencePath() + "/" + relativeFile.toString(); QString target = selectedDocument()->persistencePath() + "/" + relativeFile.toString();
if(QFileInfo(source).isDir()) if(QFileInfo(source).isDir())
Q_ASSERT(UBFileSystemUtils::copyDir(source,target)); UBFileSystemUtils::copyDir(source,target);
else{ else{
QFileInfo fi(target); QFileInfo fi(target);
QDir d = fi.dir(); QDir d = fi.dir();
d.mkpath(d.absolutePath()); d.mkpath(d.absolutePath());
Q_ASSERT(QFile::copy(source, target)); QFile::copy(source, target);
} }
} }
} }
......
...@@ -484,7 +484,7 @@ void UBPersistenceManager::deleteDocumentScenes(UBDocumentProxy* proxy, const QL ...@@ -484,7 +484,7 @@ void UBPersistenceManager::deleteDocumentScenes(UBDocumentProxy* proxy, const QL
QDir d = fi.dir(); QDir d = fi.dir();
d.mkpath(d.absolutePath()); d.mkpath(d.absolutePath());
Q_ASSERT(QFile::rename(source, target)); QFile::rename(source, target);
} }
insertDocumentSceneAt(trashDocProxy, scene, trashDocProxy->pageCount()); insertDocumentSceneAt(trashDocProxy, scene, trashDocProxy->pageCount());
......
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