diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index ef502123b9..19da5a9855 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -3165,6 +3165,11 @@ public: this->SetWidgetDisabledState(WID_VV_ORDER_LOCATION, v->current_order.GetLocation(v) == INVALID_TILE); + const Window *mainwindow = GetMainWindow(); + if (mainwindow->viewport->follow_vehicle == v->index) { + this->LowerWidget(WID_VV_LOCATION); + } + this->DrawWidgets(); } @@ -3323,6 +3328,7 @@ public: /* main window 'follows' vehicle */ mainwindow->viewport->follow_vehicle = v->index; } else { + if (mainwindow->viewport->follow_vehicle == v->index) mainwindow->viewport->follow_vehicle = INVALID_VEHICLE; ScrollMainWindowTo(v->x_pos, v->y_pos, v->z_pos); } }