board_stackup_manager: fix incorrect behavior when adding a new dielectric layer.

Fixes #12680
https://gitlab.com/kicad/code/kicad/issues/12680
This commit is contained in:
jean-pierre charras 2022-10-20 11:27:35 +02:00
parent d01dcc1c51
commit 6aa515e2f8
1 changed files with 4 additions and 2 deletions

View File

@ -287,7 +287,8 @@ void PANEL_SETUP_BOARD_STACKUP::onAddDielectricLayer( wxCommandEvent& event )
}
}
EDA_LIST_DIALOG dlg( m_parentDialog, _( "Add Dielectric Layer" ), headers, d_list );
EDA_LIST_DIALOG dlg( m_parentDialog, _( "Add Dielectric Layer" ), headers, d_list,
wxEmptyString, false /* do not sort the list: it is **expected** in stack order */);
dlg.SetListLabel( _( "Select layer to add:" ) );
dlg.HideFilter();
@ -343,7 +344,8 @@ void PANEL_SETUP_BOARD_STACKUP::onRemoveDielectricLayer( wxCommandEvent& event )
}
}
EDA_LIST_DIALOG dlg( m_parentDialog, _( "Remove Dielectric Layer" ), headers, d_list );
EDA_LIST_DIALOG dlg( m_parentDialog, _( "Remove Dielectric Layer" ), headers, d_list,
wxEmptyString, false /* do not sort the list: it is **expected** in stack order */ );
dlg.SetListLabel( _( "Select layer to remove:" ) );
dlg.HideFilter();