fix: guard against null actionManager during PlateView construction

Plate setter is called in the constructor before actionManager is
initialized, causing a NullReferenceException on startup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-07 15:45:41 -04:00
parent 0e05ad04ea
commit 3eab3c5946

View File

@@ -202,7 +202,7 @@ namespace OpenNest.Controls
foreach (var part in plate.Parts)
parts.Add(LayoutPart.Create(part, this));
actionManager.OnPlateChanged();
actionManager?.OnPlateChanged();
}
public string Status