Departure boards: Don't show "no info requested" message when departure_show_both enabled

This commit is contained in:
Jonathan G Rennison
2022-12-04 12:09:49 +00:00
parent d19771c36b
commit 77dc6915a7

View File

@@ -671,19 +671,21 @@ void DeparturesWindow<Twaypoint>::DrawDeparturesListItems(const Rect &r) const
/* Nothing selected? Then display the information text. */ /* Nothing selected? Then display the information text. */
bool none_selected[2] = {true, true}; bool none_selected[2] = {true, true};
for (uint i = 0; i < 4; ++i) for (uint i = 0; i < 4; ++i) {
{
if (this->show_types[i]) { if (this->show_types[i]) {
none_selected[0] = false; none_selected[0] = false;
break; break;
} }
} }
for (uint i = 0; i < 2; ++i) if (_settings_client.gui.departure_show_both) {
{ none_selected[1] = false;
if (this->departure_types[i]) { } else {
none_selected[1] = false; for (uint i = 0; i < 2; ++i) {
break; if (this->departure_types[i]) {
none_selected[1] = false;
break;
}
} }
} }