Loading lib/Travelynx.pm +10 −4 Original line number Diff line number Diff line Loading @@ -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; Loading lib/Travelynx/Model/Journeys.pm +6 −2 Original line number Diff line number Diff line Loading @@ -1192,8 +1192,12 @@ sub get_travel_distance { my $geo = GIS::Distance->new(); my $distance_beeline = $geo->distance_metal( @{$from_latlon}, @{$to_latlon} ); my @route = after_incl { $_->[0] eq $from } @{$route_ref}; @route = before_incl { $_->[0] eq $to } @route; my @route = after_incl { ( $_->[1] and $_->[1] == $from_eva ) or $_->[0] eq $from } @{$route_ref}; @route = before_incl { ( $_->[1] and $_->[1] == $to_eva ) or $_->[0] eq $to } @route; if ( @route < 2 or $route[-1][0] ne $to ) { Loading Loading
lib/Travelynx.pm +10 −4 Original line number Diff line number Diff line Loading @@ -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; Loading
lib/Travelynx/Model/Journeys.pm +6 −2 Original line number Diff line number Diff line Loading @@ -1192,8 +1192,12 @@ sub get_travel_distance { my $geo = GIS::Distance->new(); my $distance_beeline = $geo->distance_metal( @{$from_latlon}, @{$to_latlon} ); my @route = after_incl { $_->[0] eq $from } @{$route_ref}; @route = before_incl { $_->[0] eq $to } @route; my @route = after_incl { ( $_->[1] and $_->[1] == $from_eva ) or $_->[0] eq $from } @{$route_ref}; @route = before_incl { ( $_->[1] and $_->[1] == $to_eva ) or $_->[0] eq $to } @route; if ( @route < 2 or $route[-1][0] ne $to ) { Loading