Check via X and Y for indeterminate value before setting.

Fixes: lp:1782889
* https://bugs.launchpad.net/kicad/+bug/1782889
This commit is contained in:
Jeff Young 2018-07-21 14:04:30 +01:00
parent 5c646119a7
commit 86d98ee7fd
1 changed files with 5 additions and 1 deletions

View File

@ -374,7 +374,11 @@ bool DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow()
wxASSERT( m_vias );
VIA* v = static_cast<VIA*>( item );
v->SetPosition( wxPoint( m_viaX.GetValue(), m_viaY.GetValue() ) );
if( !m_viaX.IsIndeterminate() )
v->SetPosition( wxPoint( m_viaX.GetValue(), v->GetPosition().y ) );
if( !m_viaY.IsIndeterminate() )
v->SetPosition( wxPoint( v->GetPosition().x, m_viaY.GetValue() ) );
if( m_ViaTypeChoice->GetSelection() != 3)
{