File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Source/RunActivity/Viewer3D/RollingStock Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2160,16 +2160,17 @@ public virtual int GetDrawIndex()
21602160 case CABViewControlTypes . CPH_DISPLAY :
21612161 case CABViewControlTypes . CP_HANDLE :
21622162 var combinedHandlePosition = Locomotive . GetCombinedHandleValue ( false ) ;
2163- index = PercentToIndex ( combinedHandlePosition ) ;
21642163 // Make sure any deviation from the split position gives a different index
21652164 int handleRelativePos = combinedHandlePosition . CompareTo ( Locomotive . CombinedControlSplitPosition ) ;
21662165 if ( handleRelativePos != 0 )
21672166 {
21682167 if ( handleRelativePos == ( ControlDiscrete . Reversed ? - 1 : 1 ) )
2169- index = Math . Max ( index , SplitIndex + 1 ) ;
2168+ index = Math . Max ( PercentToIndex ( combinedHandlePosition ) , SplitIndex + 1 ) ;
21702169 else
2171- index = Math . Min ( index , SplitIndex - 1 ) ;
2170+ index = Math . Min ( PercentToIndex ( combinedHandlePosition ) , SplitIndex - 1 ) ;
21722171 }
2172+ else
2173+ index = SplitIndex ;
21732174 break ;
21742175 case CABViewControlTypes . ORTS_SELECTED_SPEED_DISPLAY :
21752176 if ( Locomotive . CruiseControl == null )
You can’t perform that action at this time.
0 commit comments