Pcbnew, DIALOG_PAD_PROPERTIES: ensure the right spoke angle is displayed.
Previously it was sometimes the default value, not the initial value when opening the dialog. Fixes #15410 https://gitlab.com/kicad/code/kicad/-/issues/15410
This commit is contained in:
parent
ed7c6b376d
commit
d8ba6c07ac
|
@ -592,6 +592,10 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
||||||
m_trapAxisCtrl->SetSelection( 1 );
|
m_trapAxisCtrl->SetSelection( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Store the initial thermal spoke angle to restore it, because some initializations
|
||||||
|
// can change this value (mainly after m_PadShapeSelector initializations)
|
||||||
|
EDA_ANGLE spokeInitialAngle = m_previewPad->GetThermalSpokeAngle();
|
||||||
|
|
||||||
m_padToDieOpt->SetValue( m_previewPad->GetPadToDieLength() != 0 );
|
m_padToDieOpt->SetValue( m_previewPad->GetPadToDieLength() != 0 );
|
||||||
m_padToDie.ChangeValue( m_previewPad->GetPadToDieLength() );
|
m_padToDie.ChangeValue( m_previewPad->GetPadToDieLength() );
|
||||||
|
|
||||||
|
@ -721,6 +725,11 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
||||||
OnPadShapeSelection( cmd_event );
|
OnPadShapeSelection( cmd_event );
|
||||||
OnOffsetCheckbox( cmd_event );
|
OnOffsetCheckbox( cmd_event );
|
||||||
|
|
||||||
|
// Restore thermal spoke angle to its initial value, because it can be modified
|
||||||
|
// by the call to OnPadShapeSelection()
|
||||||
|
m_previewPad->SetThermalSpokeAngle( spokeInitialAngle );
|
||||||
|
m_spokeAngle.SetAngleValue( m_previewPad->GetThermalSpokeAngle() );
|
||||||
|
|
||||||
// Update basic shapes list
|
// Update basic shapes list
|
||||||
displayPrimitivesList();
|
displayPrimitivesList();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue