Merge branch 'master' into jgrpp

# Conflicts:
#	src/station_gui.cpp
#	src/vehicle_cmd.cpp
#	src/vehicle_gui.cpp
This commit is contained in:
Jonathan G Rennison
2024-02-28 20:08:33 +00:00
20 changed files with 288 additions and 276 deletions

View File

@@ -557,7 +557,6 @@ public:
case WID_STL_LIST: {
bool rtl = _current_text_dir == TD_RTL;
size_t max = std::min<size_t>(this->vscroll->GetPosition() + this->vscroll->GetCapacity(), this->stations.size());
Rect tr = r.Shrink(WidgetDimensions::scaled.framerect);
uint line_height = this->GetWidget<NWidgetBase>(widget)->resize_y;
/* Spacing between station name and first rating graph. */
@@ -565,8 +564,9 @@ public:
/* Spacing between additional rating graphs. */
int rating_spacing = WidgetDimensions::scaled.hsep_normal;
for (size_t i = this->vscroll->GetPosition(); i < max; ++i) { // do until max number of stations of owner
const Station *st = this->stations[i];
auto [first, last] = this->vscroll->GetVisibleRangeIterators(this->stations);
for (auto it = first; it != last; ++it) {
const Station *st = *it;
assert(st->xy != INVALID_TILE);
/* Do not do the complex check HasStationInUse here, it may be even false