Skip to content

Commit e6c08a2

Browse files
Last control was not displayed as a ctrl-F5 rectangle
1 parent 9358732 commit e6c08a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/RunActivity/Viewer3D/Popups/ControlRectangle.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public override void Draw(SpriteBatch spriteBatch)
4545

4646
var loco = Viewer.PlayerLocomotive as MSTSLocomotive;
4747
var cabViewFrontRear = loco.UsingRearCab ? 1 : 0;
48-
var itemsFrontCount = loco.CabViewList[(int)CabViewType.Front].CVFFile.CabViewControls.Count() - 1;
49-
var itemsRearCount = loco.CabViewList.Count > 1 ? loco.CabViewList[(int)CabViewType.Rear].CVFFile.CabViewControls.Count() - 1 : 0;
48+
var itemsFrontCount = loco.CabViewList[(int)CabViewType.Front].CVFFile.CabViewControls.Count();
49+
var itemsRearCount = loco.CabViewList.Count > 1 ? loco.CabViewList[(int)CabViewType.Rear].CVFFile.CabViewControls.Count() : 0;
5050

5151
foreach (var controlRenderer in cabRenderer.ControlMap.Values.Skip(cabViewFrontRear == 0 ? 0 : itemsFrontCount).Take(cabViewFrontRear == 0 ? itemsFrontCount : itemsRearCount))
5252
{

0 commit comments

Comments
 (0)