Schematic Preferences: fix grid assert on negative width
This commit is contained in:
parent
1b6fe615e5
commit
1090403ca2
|
@ -230,7 +230,7 @@ void PANEL_TEMPLATE_FIELDNAMES::AdjustGridColumns( int aWidth )
|
||||||
// Account for scroll bars
|
// Account for scroll bars
|
||||||
aWidth -= ( m_grid->GetSize().x - m_grid->GetClientSize().x );
|
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( 1, m_checkboxColWidth );
|
||||||
m_grid->SetColSize( 2, m_checkboxColWidth );
|
m_grid->SetColSize( 2, m_checkboxColWidth );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue