Symbol Fields Table: preserve user column width on move
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16124
This commit is contained in:
parent
4d5841cc98
commit
16eb31a6e8
|
@ -927,6 +927,18 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnColMove( wxGridEvent& aEvent )
|
|||
{
|
||||
int origPos = aEvent.GetCol();
|
||||
|
||||
// Save column widths since the setup function uses the saved config values
|
||||
EESCHEMA_SETTINGS* cfg = m_parent->eeconfig();
|
||||
|
||||
for( int i = 0; i < m_grid->GetNumberCols(); i++ )
|
||||
{
|
||||
if( m_grid->IsColShown( i ) )
|
||||
{
|
||||
std::string fieldName( m_dataModel->GetColFieldName( i ).ToUTF8() );
|
||||
cfg->m_FieldEditorPanel.field_widths[fieldName] = m_grid->GetColSize( i );
|
||||
}
|
||||
}
|
||||
|
||||
CallAfter(
|
||||
[origPos, this]()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue