Symbol Fields Table: preserve user column width on move

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16124
This commit is contained in:
Mike Williams 2023-12-06 09:46:05 -05:00
parent 4d5841cc98
commit 16eb31a6e8
1 changed files with 12 additions and 0 deletions

View File

@ -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]()
{