Browse Source

Hotkey editor: prevent closing on Enter release

6.0.7
Alex 4 years ago
committed by Seth Hillbrand
parent
commit
5bf9bd3ebb
  1. 8
      common/widgets/widget_hotkey_list.cpp

8
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:

Loading…
Cancel
Save