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()
2160
2160
case CABViewControlTypes . CPH_DISPLAY :
2161
2161
case CABViewControlTypes . CP_HANDLE :
2162
2162
var combinedHandlePosition = Locomotive . GetCombinedHandleValue ( false ) ;
2163
- index = PercentToIndex ( combinedHandlePosition ) ;
2164
2163
// Make sure any deviation from the split position gives a different index
2165
2164
int handleRelativePos = combinedHandlePosition . CompareTo ( Locomotive . CombinedControlSplitPosition ) ;
2166
2165
if ( handleRelativePos != 0 )
2167
2166
{
2168
2167
if ( handleRelativePos == ( ControlDiscrete . Reversed ? - 1 : 1 ) )
2169
- index = Math . Max ( index , SplitIndex + 1 ) ;
2168
+ index = Math . Max ( PercentToIndex ( combinedHandlePosition ) , SplitIndex + 1 ) ;
2170
2169
else
2171
- index = Math . Min ( index , SplitIndex - 1 ) ;
2170
+ index = Math . Min ( PercentToIndex ( combinedHandlePosition ) , SplitIndex - 1 ) ;
2172
2171
}
2172
+ else
2173
+ index = SplitIndex ;
2173
2174
break ;
2174
2175
case CABViewControlTypes . ORTS_SELECTED_SPEED_DISPLAY :
2175
2176
if ( Locomotive . CruiseControl == null )
You can’t perform that action at this time.
0 commit comments