diff options
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-x | lib/Travelynx.pm | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 4a929f4..6ee21b3 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -2208,10 +2208,16 @@ sub startup { my @route = @{ $journey->{route} }; - my $from_index - = first_index { $_->[0] eq $journey->{from_name} } @route; - my $to_index - = first_index { $_->[0] eq $journey->{to_name} } @route; + my $from_index = first_index { + ( $_->[1] and $_->[1] == $journey->{from_eva} ) + or $_->[0] eq $journey->{from_name} + } + @route; + my $to_index = first_index { + ( $_->[1] and $_->[1] == $journey->{to_eva} ) + or $_->[0] eq $journey->{to_name} + } + @route; if ( $from_index == -1 ) { my $rename = $self->app->renamed_station; |