diff options
Diffstat (limited to 'logic')
-rw-r--r-- | logic/VersionFinal.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/logic/VersionFinal.cpp b/logic/VersionFinal.cpp index 2901fcf9..d0e85c15 100644 --- a/logic/VersionFinal.cpp +++ b/logic/VersionFinal.cpp @@ -72,9 +72,13 @@ bool VersionFinal::canRemove(const int index) const } bool VersionFinal::remove(const int index) { - if (canRemove(index)) + if (canRemove(index) && QFile::remove(versionFiles.at(index)->filename)) { - return QFile::remove(versionFiles.at(index)->filename); + beginResetModel(); + versionFiles.removeAt(index); + reapply(true); + endResetModel(); + return true; } return false; } |