DIALOG_PAD_PROPERTIES: fix 2 issues: missing initial value for roundrect corner radius

and missing resize pad display panel (minor cosmetic issue).
Fixes #9755
https://gitlab.com/kicad/code/kicad/issues/9755
Fixes #9703
https://gitlab.com/kicad/code/kicad/issues/9703
This commit is contained in:
jean-pierre charras 2021-11-24 09:44:13 +01:00
parent 18b4ebcc17
commit b6ea9afb4f
1 changed files with 8 additions and 2 deletions

View File

@ -234,8 +234,13 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, PAD* aPad
// Now all widgets have the size fixed, call FinishDialogSettings
finishDialogSettings();
wxUpdateUIEvent dummy;
OnUpdateUI( dummy );
// Update widgets
wxUpdateUIEvent dummyUI;
OnUpdateUI( dummyUI );
// Post a dummy size event to force the pad preview panel to update the
// view: actual size, best zoom ... after the frame is shown
PostSizeEvent();
}
@ -345,6 +350,7 @@ void DIALOG_PAD_PROPERTIES::prepareCanvas()
void DIALOG_PAD_PROPERTIES::updateRoundRectCornerValues()
{
// Note: use ChangeValue() to avoid generating a wxEVT_TEXT event
m_cornerRadius.ChangeValue( m_dummyPad->GetRoundRectCornerRadius() );
m_cornerRatio.ChangeDoubleValue( m_dummyPad->GetRoundRectRadiusRatio() * 100.0 );
m_mixedCornerRatio.ChangeDoubleValue( m_dummyPad->GetRoundRectRadiusRatio() * 100.0 );