Get rid of one reloadInstanceVersion

This commit is contained in:
Jan Dalheimer 2014-03-14 21:18:17 +01:00
parent e95619fa67
commit 42a85def60
2 changed files with 6 additions and 6 deletions

View File

@ -145,10 +145,6 @@ void OneSixModEditDialog::on_removeLibraryBtn_clicked()
{
QMessageBox::critical(this, tr("Error"), tr("Couldn't remove file"));
}
else
{
reloadInstanceVersion();
}
}
}

View File

@ -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;
}