mirror of https://github.com/OpenTTD/OpenTTD
Fix 667d0137: NewGRF details view does not show the "No information available", if the NewGRF sets an empty description. (#13939)
parent
f8f76eb9f3
commit
8d0ba5649a
|
@ -128,7 +128,7 @@ static void ShowNewGRFInfo(const GRFConfig &c, const Rect &r, bool show_params)
|
|||
if (c.flags.Test(GRFConfigFlag::Compatible)) tr.top = DrawStringMultiLine(tr, STR_NEWGRF_COMPATIBLE_LOADED);
|
||||
|
||||
/* Draw GRF info if it exists */
|
||||
if (auto desc = c.GetDescription(); desc.has_value()) {
|
||||
if (auto desc = c.GetDescription(); desc.has_value() && !desc->empty()) {
|
||||
tr.top = DrawStringMultiLine(tr, GetString(STR_JUST_RAW_STRING, std::move(*desc)), TC_BLACK);
|
||||
} else {
|
||||
tr.top = DrawStringMultiLine(tr, STR_NEWGRF_SETTINGS_NO_INFO);
|
||||
|
|
Loading…
Reference in New Issue