File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Source/RunActivity/Viewer3D/WebServices Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -710,6 +710,10 @@ public void buttonCouplerFrontClick(int carPosition)
710
710
TrainCarViewer . NewCarPosition = carPosition - 1 ;
711
711
if ( Viewer . CarOperationsWindow . CarPosition > carPosition - 1 )
712
712
Viewer . CarOperationsWindow . Visible = false ;
713
+ if ( Viewer . TrainCarOperationsWindow . SelectedCarPosition >= Viewer . PlayerTrain . Cars . Count ( ) )
714
+ {
715
+ Viewer . TrainCarOperationsWindow . SelectedCarPosition = Viewer . PlayerTrain . Cars . Count - 1 ;
716
+ }
713
717
}
714
718
}
715
719
@@ -808,6 +812,10 @@ public void buttonCouplerRearClick(int carPosition)
808
812
TrainCarViewer . CouplerChanged = true ;
809
813
if ( Viewer . CarOperationsWindow . CarPosition > carPosition )
810
814
Viewer . CarOperationsWindow . Visible = false ;
815
+ if ( Viewer . TrainCarOperationsWindow . SelectedCarPosition >= Viewer . PlayerTrain . Cars . Count ( ) )
816
+ {
817
+ Viewer . TrainCarOperationsWindow . SelectedCarPosition = Viewer . PlayerTrain . Cars . Count - 1 ;
818
+ }
811
819
}
812
820
}
813
821
You can’t perform that action at this time.
0 commit comments