From 77dc6915a73537d7cda1b1f28399be3aeb6381d9 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 4 Dec 2022 12:09:49 +0000 Subject: [PATCH] Departure boards: Don't show "no info requested" message when departure_show_both enabled --- src/departures_gui.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/departures_gui.cpp b/src/departures_gui.cpp index 3dabdc9b33..2e0f4c8581 100644 --- a/src/departures_gui.cpp +++ b/src/departures_gui.cpp @@ -671,19 +671,21 @@ void DeparturesWindow::DrawDeparturesListItems(const Rect &r) const /* Nothing selected? Then display the information text. */ 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]) { none_selected[0] = false; break; } } - for (uint i = 0; i < 2; ++i) - { - if (this->departure_types[i]) { - none_selected[1] = false; - break; + if (_settings_client.gui.departure_show_both) { + none_selected[1] = false; + } else { + for (uint i = 0; i < 2; ++i) { + if (this->departure_types[i]) { + none_selected[1] = false; + break; + } } }