Quiet wxWidgets asserts (sheet & symbol properties dialogs)
Ensure we don't set column size smaller than 1. If so, set to -1 to auto size.
This commit is contained in:
parent
3660597082
commit
dd219419a0
|
@ -792,7 +792,10 @@ void DIALOG_SHEET_PROPERTIES::AdjustGridColumns( int aWidth )
|
|||
for( int i = 2; i < m_grid->GetNumberCols(); i++ )
|
||||
fixedColsWidth += m_grid->GetColSize( i );
|
||||
|
||||
m_grid->SetColSize( 1, aWidth - fixedColsWidth );
|
||||
int colSize = std::max( aWidth - fixedColsWidth, -1 );
|
||||
colSize = ( colSize == 0 ) ? -1 : colSize; // don't hide the column!
|
||||
|
||||
m_grid->SetColSize( 1, colSize );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -997,7 +997,10 @@ void DIALOG_SYMBOL_PROPERTIES::AdjustGridColumns( int aWidth )
|
|||
for( int i = 2; i < m_fieldsGrid->GetNumberCols(); i++ )
|
||||
fixedColsWidth += m_fieldsGrid->GetColSize( i );
|
||||
|
||||
m_fieldsGrid->SetColSize( 1, fieldsWidth - fixedColsWidth );
|
||||
int colSize = std::max( fieldsWidth - fixedColsWidth, -1 );
|
||||
colSize = ( colSize == 0 ) ? -1 : colSize; // don't hide the column!
|
||||
|
||||
m_fieldsGrid->SetColSize( 1, colSize );
|
||||
|
||||
// Stretch the Base Name and Alternate Assignment columns to fit.
|
||||
for( int i = 0; i < COL_COUNT; ++i )
|
||||
|
|
Loading…
Reference in New Issue