Fix non working Esc when init Polyline Properties dialog.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18850
This commit is contained in:
aris-kimi
2024-10-20 12:00:56 +01:00
committed by Jeff Young
parent dc7fd828f9
commit 36bac3f467
+7 -1
View File
@@ -192,7 +192,14 @@ DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent,
}
if( m_item->GetShape() == SHAPE_T::POLY )
{
m_sizerStartEnd->Show( false );
SetInitialFocus( m_filledCtrl ); // Or Esc key won't work
}
else
{
SetInitialFocus( m_startXCtrl );
}
// Only a Bezeier curve has control points. So do not show these parameters for other shapes
if( m_item->GetShape() != SHAPE_T::BEZIER )
@@ -229,7 +236,6 @@ DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent,
m_endY.Show( false );
}
SetInitialFocus( m_startXCtrl );
SetupStandardButtons();
// Now all widgets have the size fixed, call FinishDialogSettings