diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-05-01 12:59:46 +0200 | 
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-05-01 12:59:46 +0200 | 
| commit | 8f86e23595b5c0d16214056be3be37b3b67a1394 (patch) | |
| tree | 53e5efcbb6748cd5f97d1584cdf3ab5e2f9bff50 /lib/DBInfoscreen | |
| parent | 0a94f40101d51fd925d2b948abeb0912ef527440 (diff) | |
wr preview: avoid trailing group boundary indicators
Diffstat (limited to 'lib/DBInfoscreen')
| -rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 6 | 
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'; | 
