Fix compatibility issues with wxWidgets 3.1.1
This commit is contained in:
parent
6a4d700dc8
commit
8dc4077d58
|
@ -218,7 +218,7 @@ int WX_GRID::GetVisibleWidth( int aCol, bool aHeader, bool aContents, bool aKeep
|
|||
if( aKeep )
|
||||
size = GetRowLabelSize();
|
||||
|
||||
for( int row = 0; aContents && row < GetRows(); row++ )
|
||||
for( int row = 0; aContents && row < GetNumberRows(); row++ )
|
||||
size = std::max( size, GetTextExtent( GetRowLabelValue( row ) + "M" ).x );
|
||||
}
|
||||
else
|
||||
|
@ -231,7 +231,7 @@ int WX_GRID::GetVisibleWidth( int aCol, bool aHeader, bool aContents, bool aKeep
|
|||
if( aHeader )
|
||||
size = std::max( size, GetTextExtent( GetColLabelValue( aCol ) + "M" ).x );
|
||||
|
||||
for( int row = 0; aContents && row < GetRows(); row++ )
|
||||
for( int row = 0; aContents && row < GetNumberRows(); row++ )
|
||||
size = std::max( size, GetTextExtent( GetCellValue( row, aCol ) + "M" ).x );
|
||||
}
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ bool DIALOG_FOOTPRINT_FP_EDITOR::TransferDataToWindow()
|
|||
|
||||
select3DModel( 0 ); // will clamp idx within bounds
|
||||
|
||||
for( int col = 0; col < m_itemsGrid->GetCols(); col++ )
|
||||
for( int col = 0; col < m_itemsGrid->GetNumberCols(); col++ )
|
||||
m_itemsGrid->SetColSize( col, m_itemsGrid->GetVisibleWidth( col, true, false, true ) );
|
||||
|
||||
m_itemsGrid->SetRowLabelSize( m_itemsGrid->GetVisibleWidth( -1, true, true, true ) );
|
||||
|
|
|
@ -126,7 +126,7 @@ bool PANEL_MODEDIT_DEFAULTS::TransferDataToWindow()
|
|||
m_choiceLayerValue->SetSelection( m_brdSettings.m_ValueDefaultlayer == F_SilkS ? 0 : 1 );
|
||||
m_choiceVisibleValue->SetSelection( m_brdSettings.m_ValueDefaultVisibility ? 0 : 1 );
|
||||
|
||||
for( int col = 0; col < m_grid->GetCols(); col++ )
|
||||
for( int col = 0; col < m_grid->GetNumberCols(); col++ )
|
||||
m_grid->SetColSize( col, m_grid->GetVisibleWidth( col, true, true, false ) );
|
||||
|
||||
m_grid->SetRowLabelSize( m_grid->GetVisibleWidth( -1, true, true, false ) );
|
||||
|
|
|
@ -191,7 +191,7 @@ bool PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow()
|
|||
m_grid->SetCellValue( row, COLUMN_PATH, ap->GetPluginPath() );
|
||||
}
|
||||
|
||||
for( int col = 0; col < m_grid->GetCols(); col++ )
|
||||
for( int col = 0; col < m_grid->GetNumberCols(); col++ )
|
||||
m_grid->SetColSize( col, m_grid->GetVisibleWidth( col, true, true, false ) );
|
||||
|
||||
m_grid->AutoSizeRows();
|
||||
|
|
Loading…
Reference in New Issue