Changeset 78
- Timestamp:
- Jun 2, 2021, 6:27:13 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r77 r78 67 67 68 68 procedure TFormMain.FormCreate(Sender: TObject); 69 begin 69 const 70 LinuxLanguagesDir = '/usr/share/BigMetro/languages'; 71 begin 72 {$IFDEF Linux} 73 // If installed in Linux system then use installation directory for po files 74 if not DirectoryExists(Translator1.POFilesFolder) and DirectoryExists(LinuxLanguagesDir) then 75 Translator1.POFilesFolder := LinuxLanguagesDir; 76 {$ENDIF} 77 70 78 Engine := TEngine.Create; 71 79 LoadConfig; -
trunk/UEngine.pas
r77 r78 1257 1257 if ComparePoint(P2, Position) and not ComparePoint(P1, Position) then begin 1258 1258 Angle := ArcTan2(P1.Y - Position.Y, P1.X - Position.X); 1259 end else Angle := 0;// else raise Exception.Create('TrackLink angle rrror');1259 end else Angle := 0;// else raise Exception.Create('TrackLink angle error'); 1260 1260 1261 1261 GroupItem := TPAngleGroup.SearchAngle(Angle); … … 1265 1265 TPAngleGroup.Add(GroupItem); 1266 1266 end; 1267 GroupItem.TrackLinks.Add(TrackLinks[I]) 1267 GroupItem.TrackLinks.Add(TrackLinks[I]); 1268 1268 end; 1269 1269 … … 1278 1278 NewShift.X := Trunc(MetroLineThickness * Cos(HAngle) * (J - (TrackLinks.Count - 1) / 2)); 1279 1279 NewShift.Y := Trunc(MetroLineThickness * Sin(HAngle) * (J - (TrackLinks.Count - 1) / 2)); 1280 //NewShift.X := TrackLinks.Count;1281 1280 Shift := NewShift; 1282 1281 end; … … 1900 1899 for MetroLine in Lines do 1901 1900 with MetroLine do begin 1901 // Update start 1902 1902 if Track.Points.Count > 1 then begin 1903 1903 Track.Points[0].Position := Track.Points[0].PositionDesigned + 1904 1904 Track.Points[0].LinkUp.Shift; 1905 1905 end; 1906 1906 1907 for I := 1 to Track.Points.Count - 1 do 1907 1908 with Track.Points[I] do … … 1933 1934 // end; 1934 1935 end; 1936 1937 // Update ending 1938 if Track.Points.Count > 1 then begin 1939 Track.Points[Track.Points.Count - 1].Position := Track.Points[Track.Points.Count - 1].PositionDesigned - 1940 Track.Points[Track.Points.Count - 1].LinkDown.Shift; 1941 end; 1935 1942 end; 1936 1943 1937 1944 // Remove all temporal links 1938 1945 for MetroLine in Lines do 1939 with MetroLine do 1946 with MetroLine do begin 1940 1947 for J := 0 to Track.Points.Count - 1 do 1941 1948 if Assigned(Track.Points[J].LinkUp) then begin … … 1944 1951 Track.Points[J + 1].LinkDown := nil; 1945 1952 end; 1953 end; 1946 1954 end; 1947 1955 … … 2726 2734 TrackStationUp := nil; 2727 2735 SelectedTrain := nil; 2736 Redraw; 2728 2737 end; 2729 2738
Note:
See TracChangeset
for help on using the changeset viewer.