Skip to content

Commit 0dc3392

Browse files
authored
Merge pull request #582 from Csantucci/two-colour-bar-fix
Bug fix for https://bugs.launchpad.net/or/+bug/1959617 Positive bars can't have two colours
2 parents ee96e6a + 404028a commit 0dc3392

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,9 +1827,9 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime)
18271827
if (Gauge is CVCFirebox)
18281828
destH = Math.Min(destH, (int)(yratio * (Control.PositionY + 0.5 * Gauge.Area.Height)) - destY);
18291829
}
1830-
if (Control.MinValue < 0 && Control.ControlType != CABViewControlTypes.REVERSER_PLATE && Gauge.ControlStyle != CABViewControlStyles.POINTER)
1830+
if (Control.ControlType != CABViewControlTypes.REVERSER_PLATE && Gauge.ControlStyle != CABViewControlStyles.POINTER)
18311831
{
1832-
if (Num < 0 && Gauge.NegativeColor.A != 0)
1832+
if (Num < 0 && Control.MinValue < 0 && Gauge.NegativeColor.A != 0)
18331833
{
18341834
if ((Gauge.NumNegativeColors >= 2) && (Num < Gauge.NegativeSwitchVal))
18351835
DrawColor = new Color(Gauge.SecondNegativeColor.R, Gauge.SecondNegativeColor.G, Gauge.SecondNegativeColor.B, Gauge.SecondNegativeColor.A);

0 commit comments

Comments
 (0)