File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Source/RunActivity/Viewer3D Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1083,6 +1083,21 @@ protected override void OnActivate(bool sameCamera)
10831083 isVisibleTrainCarViewerOrWebpage = ( Viewer . TrainCarOperationsWindow . Visible && ! Viewer . TrainCarOperationsViewerWindow . Visible ) || Viewer . TrainCarOperationsViewerWindow . Visible || ( Viewer . TrainCarOperationsWebpage ? . Connections > 0 && Viewer . TrainCarOperationsWebpage . TrainCarSelected ) ;
10841084 }
10851085
1086+ if ( isVisibleTrainCarViewerOrWebpage )
1087+ {
1088+ // Update the camera view
1089+ oldCarPosition = oldCarPosition == 0 && carPosition == 0 ? - 1 : oldCarPosition ;
1090+ }
1091+
1092+ if ( attachedCar != null && ! isVisibleTrainCarViewerOrWebpage && ! Front )
1093+ { // Reset behaviour of camera 3, after closing F9-window and F9-web.
1094+ var attachedCarPosition = attachedCar . Train . Cars . TakeWhile ( x => x . CarID != attachedCar . CarID ) . Count ( ) ;
1095+ if ( attachedCarPosition == carPosition )
1096+ {
1097+ attachedCar = trainCars . Last ( ) ;
1098+ }
1099+ }
1100+
10861101 if ( attachedCar == null || attachedCar . Train != Viewer . SelectedTrain || carPosition != oldCarPosition )
10871102 {
10881103 if ( Front )
You can’t perform that action at this time.
0 commit comments