Render bug (#173)

* Make viewer transparency respond faster and add to combo viewer

* Fix one cause of render crashes
This commit is contained in:
Jeremy Bullock 2020-09-15 00:07:58 -06:00 committed by GitHub
parent 1e645cf022
commit 9d1557c868
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -390,8 +390,12 @@ void TSystem::renameFile(const TFilePath &dst, const TFilePath &src,
// gestire gli errori con GetLastError?
void TSystem::deleteFile(const TFilePath &fp) {
if (!QFile::remove(toQString(fp)))
throw TSystemException(fp, "can't delete file!");
if (TSystem::doesExistFileOrLevel(fp)) {
if (fp.getQString().contains("cache")) {
QFile::remove(toQString(fp));
} else if (!QFile::remove(toQString(fp)))
throw TSystemException(fp, "can't delete file!");
}
}
//------------------------------------------------------------