File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Source/Contrib/ContentManager/Models Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -44,11 +44,10 @@ public Consist(Content content)
4444 var WagCount = 0 ;
4545 var Separator = "" ; // when set, indicates that subsequent engines are in a separate block
4646
47- Cars = from car in file . Train . TrainCfg . WagonList
48- select new Car ( car ) ;
49-
47+ var CarList = new List < Car > ( ) ;
5048 foreach ( Wagon wag in file . Train . TrainCfg . WagonList )
5149 {
50+ CarList . Add ( new Car ( wag ) ) ;
5251 if ( wag . IsEngine )
5352 {
5453 EngCount ++ ;
@@ -65,6 +64,7 @@ public Consist(Content content)
6564 if ( EngCount > 0 ) { NumEngines = NumEngines + Separator + EngCount . ToString ( ) ; }
6665 if ( NumEngines == null ) { NumEngines = "0" ; }
6766 NumCars = WagCount . ToString ( ) ;
67+ Cars = CarList ;
6868 }
6969 }
7070
You can’t perform that action at this time.
0 commit comments