mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
schematic: allow label properties window to be closed with numpad enter
This commit is contained in:
parent
424807da03
commit
5576d1ed9c
@ -431,10 +431,10 @@ void DIALOG_LABEL_PROPERTIES::OnEnterKey( wxCommandEvent& aEvent )
|
||||
|
||||
void DIALOG_LABEL_PROPERTIES::OnCBValueCharHook( wxKeyEvent& aEvent )
|
||||
{
|
||||
// If the key is WXK_RETURN because m_valueCombo is the source event, we do not skip
|
||||
// If the key is WXK_RETURN/WXK_NUMPAD_ENTER because m_valueCombo is the source event, we do not skip
|
||||
// the key event because the default action is to show the m_valueCombo dropdown list,
|
||||
// and we only want to accept the entered string.
|
||||
if( aEvent.GetKeyCode() == WXK_RETURN )
|
||||
if(( aEvent.GetKeyCode() == WXK_RETURN ) || (aEvent.GetKeyCode() == WXK_NUMPAD_ENTER))
|
||||
{
|
||||
wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user