Hotkey editor: prevent closing on Enter release
This commit is contained in:
parent
a86a646eb0
commit
5bf9bd3ebb
|
@ -198,10 +198,14 @@ protected:
|
|||
}
|
||||
|
||||
void OnKeyUp( wxKeyEvent& aEvent )
|
||||
{
|
||||
// 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:
|
||||
wxKeyEvent m_event;
|
||||
|
|
Loading…
Reference in New Issue