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)
710710 TrainCarViewer . NewCarPosition = carPosition - 1 ;
711711 if ( Viewer . CarOperationsWindow . CarPosition > carPosition - 1 )
712712 Viewer . CarOperationsWindow . Visible = false ;
713+ if ( Viewer . TrainCarOperationsWindow . SelectedCarPosition >= Viewer . PlayerTrain . Cars . Count ( ) )
714+ {
715+ Viewer . TrainCarOperationsWindow . SelectedCarPosition = Viewer . PlayerTrain . Cars . Count - 1 ;
716+ }
713717 }
714718 }
715719
@@ -808,6 +812,10 @@ public void buttonCouplerRearClick(int carPosition)
808812 TrainCarViewer . CouplerChanged = true ;
809813 if ( Viewer . CarOperationsWindow . CarPosition > carPosition )
810814 Viewer . CarOperationsWindow . Visible = false ;
815+ if ( Viewer . TrainCarOperationsWindow . SelectedCarPosition >= Viewer . PlayerTrain . Cars . Count ( ) )
816+ {
817+ Viewer . TrainCarOperationsWindow . SelectedCarPosition = Viewer . PlayerTrain . Cars . Count - 1 ;
818+ }
811819 }
812820 }
813821
You can’t perform that action at this time.
0 commit comments