From cd51f7cfda188b14c044be37d41431a813d0e952 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Wed, 28 Oct 2026 07:48:06 -0400 Subject: [PATCH] fix(ui): stop the cut simulator's time readout flashing Playback rewrites the status labels every frame, and a plain Label erases its background before drawing the new text, so the time blinked. The status values now use a double-buffered label. Co-Authored-By: Claude Opus 5.5 --- OpenNest/Forms/CutSimulatorForm.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/OpenNest/Forms/CutSimulatorForm.cs b/OpenNest/Forms/CutSimulatorForm.cs index 622a081c..34d8c8c1 100644 --- a/OpenNest/Forms/CutSimulatorForm.cs +++ b/OpenNest/Forms/CutSimulatorForm.cs @@ -225,7 +225,7 @@ namespace OpenNest.Forms // Fixed height so changing text never resizes the window. private Label StatusValue(int lines) => - new() + new BufferedLabel { AutoSize = false, AutoEllipsis = true, @@ -451,5 +451,14 @@ namespace OpenNest.Forms base.OnFormClosed(e); } + + // Playback rewrites the status every frame; a plain label erases before it redraws, so it flashes. + private sealed class BufferedLabel : Label + { + public BufferedLabel() + { + DoubleBuffered = true; + } + } } }