1
Fork 0
mirror of https://github.com/thegeneralist01/Scene-Manager-DevRepo synced 2026-01-12 08:00:30 +01:00

Fixed condition for toggling End Path menu item

This commit is contained in:
Rich Dunne 2020-08-24 20:14:51 -06:00
parent 25fbd0a8ec
commit fd4a46587d

View file

@ -184,7 +184,7 @@ namespace SceneManager
private static void ToggleTrafficEndPathMenuItem(int pathIndex) private static void ToggleTrafficEndPathMenuItem(int pathIndex)
{ {
if ((PathMainMenu.GetPaths()[pathIndex].Waypoints.Count == 1 && PathMainMenu.GetPaths()[pathIndex].Waypoints.First().DrivingFlag == VehicleDrivingFlags.StopAtDestination) || (PathMainMenu.GetPaths()[pathIndex].Waypoints.Count > 1 && PathMainMenu.GetPaths()[pathIndex].Waypoints.Any(p => p.DrivingFlag != VehicleDrivingFlags.StopAtDestination))) if ((PathMainMenu.GetPaths()[pathIndex].Waypoints.Count == 1 && PathMainMenu.GetPaths()[pathIndex].Waypoints.First().DrivingFlag == VehicleDrivingFlags.StopAtDestination) || (PathMainMenu.GetPaths()[pathIndex].Waypoints.Count > 1))
{ {
trafficEndPath.Enabled = true; trafficEndPath.Enabled = true;
} }