Unverified Commit 4c6612a0 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

set wagon->group_index even if train type is unknown

parent 89ea4891
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -338,12 +338,10 @@ sub parse_wagons {
	for my $i ( 0 .. $#wagon_groups ) {
		my $group = $wagon_groups[$i];
		my $tt    = $self->wagongroup_subtype( @{$group} );
		if ($tt) {
		for my $wagon ( @{$group} ) {
			$wagon->set_traintype( $i, $tt );
		}
	}
	}

	$self->{wagongroups} = [@wagon_groups];
}
+6 −1
Original line number Diff line number Diff line
@@ -204,6 +204,11 @@ sub set_traintype {
	my ( $self, $group_index, $tt ) = @_;

	$self->{group_index} = $group_index;

	if ( not $tt ) {
		return;
	}

	$self->{train_subtype} = $tt;

	if ( not $self->{number} or not exists( $type_attributes{$tt} ) ) {