Get rid of one reloadInstanceVersion
This commit is contained in:
		| @@ -145,10 +145,6 @@ void OneSixModEditDialog::on_removeLibraryBtn_clicked() | ||||
| 		{ | ||||
| 			QMessageBox::critical(this, tr("Error"), tr("Couldn't remove file")); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			reloadInstanceVersion(); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -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; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user