From ca14697ad608d99810864d952f04c4e03e2a9b4b Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 8 Sep 2022 23:50:42 +0100 Subject: [PATCH] Fix issue trying to size stuff before it's displayed. Fixes https://gitlab.com/kicad/code/kicad/issues/12386 --- pcbnew/dialogs/panel_fp_properties_3d_model.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/dialogs/panel_fp_properties_3d_model.cpp b/pcbnew/dialogs/panel_fp_properties_3d_model.cpp index 15993a7504..fb0de97cae 100644 --- a/pcbnew/dialogs/panel_fp_properties_3d_model.cpp +++ b/pcbnew/dialogs/panel_fp_properties_3d_model.cpp @@ -451,7 +451,8 @@ void PANEL_FP_PROPERTIES_3D_MODEL::AdjustGridColumnWidths() int width = modelsWidth - m_modelsGrid->GetColSize( COL_SHOWN ) - m_modelsGrid->GetColSize( COL_PROBLEM ); - m_modelsGrid->SetColSize( COL_FILENAME, width ); + if( width > 0 ) + m_modelsGrid->SetColSize( COL_FILENAME, width ); }