DIALOG_SHIM: Enable Cancel button when editing
The cancel action was set for the escape key when editing the fields in a dialog. But when the action is a button, we need to ensure that the escape id is set to ANY for processing. Fixes: lp:1818056 * https://bugs.launchpad.net/kicad/+bug/1818056
This commit is contained in:
parent
b9097c2c1d
commit
307a7154b6
|
@ -434,10 +434,15 @@ void DIALOG_SHIM::OnCloseWindow( wxCloseEvent& aEvent )
|
|||
|
||||
void DIALOG_SHIM::OnButton( wxCommandEvent& aEvent )
|
||||
{
|
||||
const int id = aEvent.GetId();
|
||||
|
||||
// If we are pressing a button to exit, we need to enable the escapeID
|
||||
// otherwise the dialog does not process cancel
|
||||
if( id == wxID_CANCEL )
|
||||
SetEscapeId( wxID_ANY );
|
||||
|
||||
if( IsQuasiModal() )
|
||||
{
|
||||
const int id = aEvent.GetId();
|
||||
|
||||
if( id == GetAffirmativeId() )
|
||||
{
|
||||
EndQuasiModal( id );
|
||||
|
|
Loading…
Reference in New Issue