Attempt to fix MSW Cancel-still-validates bug.
Fixes: lp:1805361 * https://bugs.launchpad.net/kicad/+bug/1805361
This commit is contained in:
parent
8cf9ab5a4c
commit
72f17ad7f0
|
@ -91,6 +91,13 @@ void UNIT_BINDER::onSetFocus( wxFocusEvent& aEvent )
|
|||
|
||||
|
||||
void UNIT_BINDER::onKillFocus( wxFocusEvent& aEvent )
|
||||
{
|
||||
if( aEvent.GetWindow() && aEvent.GetWindow()->GetId() == wxID_CANCEL )
|
||||
{
|
||||
// Don't eval or validate when focus lost due to Cancel. While most platforms
|
||||
// suppress KillFocus events after a Cancel, MSW (at least) does not.
|
||||
}
|
||||
else
|
||||
{
|
||||
auto textEntry = dynamic_cast<wxTextEntry*>( m_value );
|
||||
|
||||
|
@ -103,6 +110,7 @@ void UNIT_BINDER::onKillFocus( wxFocusEvent& aEvent )
|
|||
}
|
||||
|
||||
Validate( true );
|
||||
}
|
||||
|
||||
aEvent.Skip();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue