summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r--src/vehicle_gui.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index 5bd5f18ef..9c94fea4b 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -758,9 +758,14 @@ struct RefitWindow : public Window {
if (left_x < 0 && !start_counting) {
this->selected_vehicle = u->index;
start_counting = true;
+
+ /* Count the first vehicle, even if articulated part */
+ this->num_vehicles++;
+ } else if (start_counting && !u->IsArticulatedPart()) {
+ /* Do not count articulated parts */
+ this->num_vehicles++;
}
- if (start_counting) this->num_vehicles++;
if (right_x < 0) break;
}
}