From 8f86e23595b5c0d16214056be3be37b3b67a1394 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 1 May 2024 12:59:46 +0200 Subject: wr preview: avoid trailing group boundary indicators --- lib/DBInfoscreen/Controller/Stationboard.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/DBInfoscreen/Controller/Stationboard.pm') 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'; -- cgit v1.2.3