1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-28 00:49:11 +00:00

Fix 0455627d: Don't draw timetable panel if no orders (#14441)

This commit is contained in:
Loïc Guilloux
2025-07-14 16:18:54 +02:00
committed by GitHub
parent 61a299bc99
commit fc924161ab

View File

@@ -427,6 +427,7 @@ struct TimetableWindow : Window {
void DrawTimetablePanel(const Rect &r) const
{
const Vehicle *v = this->vehicle;
if (v->GetNumOrders() == 0) return;
Rect tr = r.Shrink(WidgetDimensions::scaled.framerect);
int i = this->vscroll->GetPosition();
VehicleOrderID order_id = (i + 1) / 2;