From: ian Date: Fri, 22 Oct 2004 23:45:16 +0000 (+0000) Subject: fix segment orientation for parts X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=38a3cab373a5cfbbd5af1356f96bb7c649dca6c7;p=trains.git fix segment orientation for parts --- diff --git a/layout/layout b/layout/layout index ba06d0a..342aaaa 100755 --- a/layout/layout +++ b/layout/layout @@ -1226,7 +1226,9 @@ sub cmd__obj ($) { } else { $ctx->{InRunObj}= $ctx_save->{InRunObj}."${obj_id}::"; } - $ctx->{SegName}= $1 if $segments[0] =~ m,([^-]+)/,; + if ($segments[0] =~ m,(.*[^-]+)/,) { + $ctx->{SegName}= $1; + } $ctx->{DrawMap}= sub { my ($i) = @_; $i= &{ $ctx_save->{DrawMap} }($i);