when page is deleted the pictures are deleted too

preferencesAboutTextFull
Claudio Valerio 10 years ago
parent 4b00016ca7
commit 7cd7af2de4
  1. 4
      src/board/UBBoardController.cpp
  2. 2
      src/core/UBPersistenceManager.cpp

@ -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
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());

Loading…
Cancel
Save