fix: guard IsHandleCreated in EditNestForm timer
Prevent InvalidOperationException when the timer fires before or after the control handle is available. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -774,6 +774,9 @@ namespace OpenNest.Forms
|
|||||||
|
|
||||||
private void drawingListUpdateTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
private void drawingListUpdateTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (!drawingListBox1.IsHandleCreated)
|
||||||
|
return;
|
||||||
|
|
||||||
drawingListBox1.Invoke(new MethodInvoker(() =>
|
drawingListBox1.Invoke(new MethodInvoker(() =>
|
||||||
{
|
{
|
||||||
drawingListBox1.Refresh();
|
drawingListBox1.Refresh();
|
||||||
|
|||||||
Reference in New Issue
Block a user