diff --git a/common/widgets/widget_hotkey_list.cpp b/common/widgets/widget_hotkey_list.cpp index b8e581d2aa..030f72e862 100644 --- a/common/widgets/widget_hotkey_list.cpp +++ b/common/widgets/widget_hotkey_list.cpp @@ -199,8 +199,12 @@ protected: void OnKeyUp( wxKeyEvent& aEvent ) { - /// This needs to occur in KeyUp, so that we don't pass the event back to pcbnew - wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) ); + // If dialog opened using Enter key, prevent closing when releasing Enter. + if( m_event.GetEventType() != wxEVT_NULL ) + { + /// This needs to occur in KeyUp, so that we don't pass the event back to pcbnew + wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) ); + } } private: