From a392cc0863592df51afbb54424bd19314d459bb9 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Sat, 31 Oct 2026 05:28:58 -0400 Subject: [PATCH] fix(cad-converter): skip the Dimensions fill during FilterPanel construction AutoScroll runs a layout inside the constructor before dimensionsPanel exists, so every CAD Converter form threw NullReferenceException. --- OpenNest/Controls/FilterPanel.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenNest/Controls/FilterPanel.cs b/OpenNest/Controls/FilterPanel.cs index b4e827ce..1f962b99 100644 --- a/OpenNest/Controls/FilterPanel.cs +++ b/OpenNest/Controls/FilterPanel.cs @@ -371,7 +371,8 @@ namespace OpenNest.Controls // shows every dimension instead of scrolling inside a short box. private void FillDimensionsToBottom() { - if (!dimensionsPanel.IsExpanded) + // Layout already runs inside the constructor (AutoScroll), before the sections exist. + if (dimensionsPanel is not { IsExpanded: true }) return; var above = 0;