From 19223b9dd2c8446ba40a7e12e0057283d4d4dbcd Mon Sep 17 00:00:00 2001 From: John Lewin Date: Fri, 6 Apr 2018 12:47:42 -0700 Subject: [PATCH] Invalidate on Checked change to force redraw - Issue MatterHackers/MCCentral#3047 SliceSettings checkbox fields acting erratically --- PartPreviewWindow/RoundedToggleSwitch.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/PartPreviewWindow/RoundedToggleSwitch.cs b/PartPreviewWindow/RoundedToggleSwitch.cs index e4c962c1b..ae013a8ca 100644 --- a/PartPreviewWindow/RoundedToggleSwitch.cs +++ b/PartPreviewWindow/RoundedToggleSwitch.cs @@ -54,7 +54,16 @@ namespace MatterHackers.MatterControl.CustomWidgets private double toggleRadius = 10; private double toggleRadiusPlusPadding = 11; - public bool Checked { get; set; } + private bool _checked; + public bool Checked + { + get => _checked; + set + { + _checked = value; + this.Invalidate(); + } + } public event EventHandler CheckedStateChanged;