summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-05-01 12:59:46 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-05-01 12:59:46 +0200
commit8f86e23595b5c0d16214056be3be37b3b67a1394 (patch)
tree53e5efcbb6748cd5f97d1584cdf3ab5e2f9bff50
parent0a94f40101d51fd925d2b948abeb0912ef527440 (diff)
wr preview: avoid trailing group boundary indicators
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index a62c965..b64c661 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -753,6 +753,7 @@ sub render_train {
grep { $_->desc_short } $wr->groups );
my $first = 0;
for my $group ( $wr->groups ) {
+ my $had_entry = 0;
for my $wagon ( $group->wagons ) {
if (
not( $wagon->is_locomotive
@@ -790,9 +791,12 @@ sub render_train {
@{ $departure->{wr_preview} },
[ $entry, $class ]
);
+ $had_entry = 1;
}
}
- $first = 1;
+ if ($had_entry) {
+ $first = 1;
+ }
}
};
$departure->{wr_text} ||= 'Wagen';