mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-30 11:51:08 -04:00
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
6f4e872c03
commit
cd51f7cfda
1 file changed
+10
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user