mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-27 06:01:06 -04:00
ColorScheme.Default and LayoutPart kept single static pens, brushes and a font that every plate view and drawing preview painted with. GDI+ objects are not thread-safe, so two views painting at once on different UI threads (parallel WinForms test collections) failed in PlateRenderer.DrawPlate with "Object is currently in use elsewhere" and crashed the test host. The scheme now builds its pens and brushes per thread and rebuilds them after a color change; LayoutPart's selection, lead-in and label objects are thread-static. A regression test paints previews on four threads at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>