# HG changeset patch # User Tess Snider # Date 2021-07-26 08:13:39 # Node ID e9358d0228ac89151dfb11f4bbd61d2e74562785 # Parent 11d11a57837d0abe03d3c253c702d294bbed9ff5 Now recalculating recipe (and thus hypothetical color) after a Clear. Also, clip status now clears when doing a white extrapolation. diff --git a/Models/ReactionTest.cs b/Models/ReactionTest.cs --- a/Models/ReactionTest.cs +++ b/Models/ReactionTest.cs @@ -224,7 +224,7 @@ namespace DesertPaintCodex.Models (reaction.Blue < baseColor.Blue)) { // White-shift down clip. - extrapolated = ExtrapolateWhiteFromOneChannel(_observedColor.Red, 0, reaction.Red); + extrapolated = ExtrapolateWhiteFromOneChannel(_observedColor.Red, 0, reaction.Red); if (!extrapolated) extrapolated = ExtrapolateWhiteFromOneChannel(_observedColor.Green, 0, reaction.Green); if (!extrapolated) ExtrapolateWhiteFromOneChannel(_observedColor.Blue, 0, reaction.Blue); } @@ -233,7 +233,7 @@ namespace DesertPaintCodex.Models (reaction.Blue > baseColor.Blue)) { // White-shift up clip. - extrapolated = ExtrapolateWhiteFromOneChannel(_observedColor.Red, 255, reaction.Red); + extrapolated = ExtrapolateWhiteFromOneChannel(_observedColor.Red, 255, reaction.Red); if (!extrapolated) extrapolated = ExtrapolateWhiteFromOneChannel(_observedColor.Green, 255, reaction.Green); if (!extrapolated) ExtrapolateWhiteFromOneChannel(_observedColor.Blue, 255, reaction.Blue); } @@ -261,6 +261,7 @@ namespace DesertPaintCodex.Models { if (result == clipBound) return false; + Clipped = ClipType.None; State = TestState.GoodResult; Reaction = new Reaction(reaction, reaction, reaction); @@ -295,6 +296,7 @@ namespace DesertPaintCodex.Models BadReaction = null; Clipped = ClipType.None; State = TestState.Untested; + UpdateRecipe(); } public void SaveReaction()