From 1090403ca22e2846d9571c661d0596a28c9c0e0f Mon Sep 17 00:00:00 2001 From: Mike Williams Date: Sun, 13 Feb 2022 15:25:25 -0500 Subject: [PATCH] Schematic Preferences: fix grid assert on negative width --- eeschema/dialogs/panel_template_fieldnames.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/dialogs/panel_template_fieldnames.cpp b/eeschema/dialogs/panel_template_fieldnames.cpp index f9a224791d..23f56011dd 100644 --- a/eeschema/dialogs/panel_template_fieldnames.cpp +++ b/eeschema/dialogs/panel_template_fieldnames.cpp @@ -230,7 +230,7 @@ void PANEL_TEMPLATE_FIELDNAMES::AdjustGridColumns( int aWidth ) // Account for scroll bars aWidth -= ( m_grid->GetSize().x - m_grid->GetClientSize().x ); - m_grid->SetColSize( 0, aWidth - 2 * m_checkboxColWidth ); + m_grid->SetColSize( 0, std::max( 40, aWidth - 2 * m_checkboxColWidth ) ); m_grid->SetColSize( 1, m_checkboxColWidth ); m_grid->SetColSize( 2, m_checkboxColWidth ); }