Don't sends events during initialization of UNIT_BINDER.

It can get us in all sorts of trouble.

Fixes: lp:1782855
* https://bugs.launchpad.net/kicad/+bug/1782855
This commit is contained in:
Jeff Young 2018-07-21 09:41:38 +01:00
parent 6d2dfbb5c3
commit 06ea7cdb79
1 changed files with 4 additions and 1 deletions

View File

@ -49,7 +49,10 @@ UNIT_BINDER::UNIT_BINDER( EDA_DRAW_FRAME* aParent,
auto textEntry = dynamic_cast<wxTextEntry*>( m_value );
if( textEntry )
textEntry->SetValue( wxT( "0" ) );
{
// Use ChangeValue() instead of SetValue() so we don't generate events.
textEntry->ChangeValue( wxT( "0" ) );
}
m_unitLabel->SetLabel( GetAbbreviatedUnitsLabel( m_units, m_useMils ) );