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:
parent
23aa838a03
commit
dc5ae574e2
|
@ -387,6 +387,7 @@ bool DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow()
|
||||||
if( col == 6 )
|
if( col == 6 )
|
||||||
col_size += 20;
|
col_size += 20;
|
||||||
|
|
||||||
|
if( m_itemsGrid->IsColShown( col ) )
|
||||||
m_itemsGrid->SetColSize( col, col_size );
|
m_itemsGrid->SetColSize( col, col_size );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -303,6 +303,7 @@ bool DIALOG_FOOTPRINT_FP_EDITOR::TransferDataToWindow()
|
||||||
if( col == 6 )
|
if( col == 6 )
|
||||||
col_size += 20;
|
col_size += 20;
|
||||||
|
|
||||||
|
if( m_itemsGrid->IsColShown( col ) )
|
||||||
m_itemsGrid->SetColSize( col, col_size );
|
m_itemsGrid->SetColSize( col, col_size );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,9 @@ bool PANEL_MODEDIT_DEFAULTS::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
// Set the minimal width to the column label size.
|
// Set the minimal width to the column label size.
|
||||||
m_grid->SetColMinimalWidth( col, m_grid->GetVisibleWidth( col, true, false, false ) );
|
m_grid->SetColMinimalWidth( col, m_grid->GetVisibleWidth( col, true, false, false ) );
|
||||||
|
|
||||||
// Set the width to see the full contents
|
// Set the width to see the full contents
|
||||||
|
if( m_grid->IsColShown( col ) )
|
||||||
m_grid->SetColSize( col, m_grid->GetVisibleWidth( col, true, true, true ) );
|
m_grid->SetColSize( col, m_grid->GetVisibleWidth( col, true, true, true ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue