Restore ability to hide grid columns.
wxGrids stupidly does this by setting the width to zero, so you have to be careful when adjusting minimum widths.
This commit is contained in:
@@ -387,7 +387,8 @@ bool DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow()
|
||||
if( col == 6 )
|
||||
col_size += 20;
|
||||
|
||||
m_itemsGrid->SetColSize( col, col_size );
|
||||
if( m_itemsGrid->IsColShown( col ) )
|
||||
m_itemsGrid->SetColSize( col, col_size );
|
||||
}
|
||||
|
||||
m_itemsGrid->SetRowLabelSize( m_itemsGrid->GetVisibleWidth( -1, false, true, true ) );
|
||||
|
||||
@@ -303,7 +303,8 @@ bool DIALOG_FOOTPRINT_FP_EDITOR::TransferDataToWindow()
|
||||
if( col == 6 )
|
||||
col_size += 20;
|
||||
|
||||
m_itemsGrid->SetColSize( col, col_size );
|
||||
if( m_itemsGrid->IsColShown( col ) )
|
||||
m_itemsGrid->SetColSize( col, col_size );
|
||||
}
|
||||
|
||||
m_itemsGrid->SetRowLabelSize( m_itemsGrid->GetVisibleWidth( -1, true, true, true ) );
|
||||
|
||||
@@ -130,8 +130,10 @@ bool PANEL_MODEDIT_DEFAULTS::TransferDataToWindow()
|
||||
{
|
||||
// Set the minimal width to the column label size.
|
||||
m_grid->SetColMinimalWidth( col, m_grid->GetVisibleWidth( col, true, false, false ) );
|
||||
|
||||
// Set the width to see the full contents
|
||||
m_grid->SetColSize( col, m_grid->GetVisibleWidth( col, true, true, true ) );
|
||||
if( m_grid->IsColShown( col ) )
|
||||
m_grid->SetColSize( col, m_grid->GetVisibleWidth( col, true, true, true ) );
|
||||
}
|
||||
|
||||
m_grid->SetRowLabelSize( m_grid->GetVisibleWidth( -1, true, true, true ) );
|
||||
|
||||
Reference in New Issue
Block a user