Skip to content

Commit

Permalink
Updated fix with suggestion from Ryan
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharpe49 committed Jul 26, 2020
1 parent abd68c3 commit ab92942
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2564,15 +2564,11 @@ public ThreeDimentionCabViewer(Viewer viewer, MSTSLocomotive car, MSTSLocomotive
break;
default:
//cvf file has no external wipers, left door, right door and mirrors key word
if (locoViewer.ThreeDimentionCabRenderer.ControlMap.ContainsKey(key))
{
style = locoViewer.ThreeDimentionCabRenderer.ControlMap[key];
}
else
if (!locoViewer.ThreeDimentionCabRenderer.ControlMap.TryGetValue(key, out style))
{
var cvfBasePath = Path.Combine(Path.GetDirectoryName(Locomotive.WagFilePath), "CABVIEW");
var cvfFilePath = Path.Combine(cvfBasePath, Locomotive.CVFFileName);
Trace.TraceWarning("Cabview control " + tmp[0].Trim() + " has not been defined in CVF file " + cvfFilePath);
Trace.TraceWarning($"Cabview control {tmp[0].Trim()} has not been defined in CVF file {cvfFilePath}");
}
break;
}
Expand Down

0 comments on commit ab92942

Please sign in to comment.