TEXT_CTRL_EVAL: Close the parent dialog after pressing Enter
Fixes: lp:1744721 * https://bugs.launchpad.net/kicad/+bug/1744721
This commit is contained in:
parent
975c08c464
commit
121e670508
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 CERN
|
* Copyright (C) 2017-2018 CERN
|
||||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -59,7 +59,10 @@ void TEXT_CTRL_EVAL::onTextFocusLost( wxFocusEvent& aEvent )
|
||||||
void TEXT_CTRL_EVAL::onTextEnter( wxCommandEvent& aEvent )
|
void TEXT_CTRL_EVAL::onTextEnter( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
evaluate();
|
evaluate();
|
||||||
aEvent.Skip();
|
|
||||||
|
// Accept the changes and close the parent dialog
|
||||||
|
wxCommandEvent event( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK );
|
||||||
|
wxPostEvent( GetParent(), event );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 CERN
|
* Copyright (C) 2017-2018 CERN
|
||||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
|
Loading…
Reference in New Issue