Change: Move baseset missing/corrupted files label to list item. (#11455)
This allows any baseset error to be displayed in the drop down list so it is more easily visible, and avoids wasted space in the layout.
This commit is contained in:
@@ -121,6 +121,21 @@ struct BaseSet {
|
||||
return this->description.at(std::string{});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get string to use when listing this set in the settings window.
|
||||
* If there are no invalid files, then this is just the set name,
|
||||
* otherwise a string is formatted including the number of invalid files.
|
||||
* @return the string to display.
|
||||
*/
|
||||
std::string GetListLabel() const
|
||||
{
|
||||
if (this->GetNumInvalid() == 0) return this->name;
|
||||
|
||||
SetDParamStr(0, this->name);
|
||||
SetDParam(1, this->GetNumInvalid());
|
||||
return GetString(STR_BASESET_STATUS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate and check the MD5 hash of the supplied file.
|
||||
* @param file The file get the hash of.
|
||||
|
Reference in New Issue
Block a user