Fix mistake in 7edda82b where any key could delete the material

This commit is contained in:
Ian McInerney 2024-02-03 17:01:57 +00:00
parent 7edda82b2a
commit dc6fb73b40
1 changed files with 1 additions and 1 deletions

View File

@ -134,6 +134,6 @@ void DIALOG_DIELECTRIC_MATERIAL::onListKeyDown( wxListEvent& event )
{
int idx = event.GetIndex();
if( idx > 0 )
if( ( idx > 0 ) && ( event.GetKeyCode() == WXK_DELETE ) )
m_lcMaterials->DeleteItem( idx );
}