Improve robustness of numeric evaluation.
It would appear that some platforms process the KILL_FOCUS event after running TransferDataFromWindow(). This change makes sure that the evaluation is done no matter the order. Fixes: lp:1793911 * https://bugs.launchpad.net/kicad/+bug/1793911
This commit is contained in:
@@ -76,9 +76,6 @@ void TEXT_CTRL_EVAL::onTextEnter( wxCommandEvent& aEvent )
|
||||
|
||||
void TEXT_CTRL_EVAL::evaluate()
|
||||
{
|
||||
if( GetValue().IsEmpty() )
|
||||
wxTextCtrl::SetValue( "0" );
|
||||
|
||||
if( m_eval.Process( GetValue() ) )
|
||||
SetValue( m_eval.Result() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user