Schematic Preferences: fix grid assert on negative width

This commit is contained in:
Mike Williams 2022-02-13 15:25:25 -05:00 committed by Jeff Young
parent 1b6fe615e5
commit 1090403ca2
1 changed files with 1 additions and 1 deletions

View File

@ -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 );
}