mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-17 16:37:41 -05:00
Both dialogs revalidated with a System.Timers.Timer whose SynchronizingObject was the form. Before the dialog has a handle, InvokeRequired is false, so the Elapsed handler ran EnableCheck on a pool thread. When the UI thread was busy (for example with the cut simulator open), the timer fired before ShowDialog and touched applyButton while the UI thread was creating it, throwing a cross-thread InvalidOperationException. Use a WinForms timer, which always ticks on the UI thread, and stop starting it from the constructor, which already calls EnableCheck directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>