Keep dialog fields in sync with dummyPad values.

Fixes https://gitlab.com/kicad/code/kicad/issues/8294
This commit is contained in:
Jeff Young 2021-04-25 14:19:00 +01:00
parent 93d42e9902
commit 953f579d59
1 changed files with 7 additions and 11 deletions

View File

@ -317,18 +317,14 @@ void DIALOG_PAD_PROPERTIES::updateRoundRectCornerValues()
{
// Note: use m_tcCornerSizeRatio->ChangeValue() to avoid generating a wxEVT_TEXT event
if( m_dummyPad->GetShape() == PAD_SHAPE_ROUNDRECT ||
m_dummyPad->GetShape() == PAD_SHAPE_CHAMFERED_RECT )
{
wxString ratio = wxString::Format( "%.1f", m_dummyPad->GetRoundRectRadiusRatio() * 100 );
m_tcCornerSizeRatio->ChangeValue( ratio );
m_tcMixedCornerSizeRatio->ChangeValue( ratio );
m_cornerRadius.ChangeValue( m_dummyPad->GetRoundRectCornerRadius() );
wxString ratio = wxString::Format( "%.1f", m_dummyPad->GetRoundRectRadiusRatio() * 100 );
m_tcCornerSizeRatio->ChangeValue( ratio );
m_tcMixedCornerSizeRatio->ChangeValue( ratio );
m_cornerRadius.ChangeValue( m_dummyPad->GetRoundRectCornerRadius() );
ratio = wxString::Format( "%.1f", m_dummyPad->GetChamferRectRatio() * 100 );
m_tcChamferRatio->ChangeValue( ratio );
m_tcMixedChamferRatio->ChangeValue( ratio );
}
ratio = wxString::Format( "%.1f", m_dummyPad->GetChamferRectRatio() * 100 );
m_tcChamferRatio->ChangeValue( ratio );
m_tcMixedChamferRatio->ChangeValue( ratio );
}