Remove wxFloatingPointValidator which causes issues in some locales.

Fixes https://gitlab.com/kicad/code/kicad/issues/12176
This commit is contained in:
Jeff Young 2022-10-02 12:59:40 +01:00
parent b08dccb7b3
commit cf6fd64758
1 changed files with 4 additions and 11 deletions

View File

@ -58,9 +58,6 @@ private:
bool m_flipStartEnd;
wxFloatingPointValidator<double> m_AngleValidator;
double m_AngleValue;
public:
DIALOG_GRAPHIC_ITEM_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, BOARD_ITEM* aItem );
~DIALOG_GRAPHIC_ITEM_PROPERTIES() {};
@ -94,9 +91,7 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES( PCB_BASE_EDIT_FR
m_bezierCtrl1Y( aParent, m_BezierPointC1YLabel, m_BezierC1Y_Ctrl, m_BezierPointC1YUnit ),
m_bezierCtrl2X( aParent, m_BezierPointC2XLabel, m_BezierC2X_Ctrl, m_BezierPointC2XUnit ),
m_bezierCtrl2Y( aParent, m_BezierPointC2YLabel, m_BezierC2Y_Ctrl, m_BezierPointC2YUnit ),
m_flipStartEnd( false ),
m_AngleValidator( 1, &m_AngleValue ),
m_AngleValue( 0.0 )
m_flipStartEnd( false )
{
m_parent = aParent;
m_item = dynamic_cast<PCB_SHAPE*>( aItem );
@ -113,9 +108,6 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES( PCB_BASE_EDIT_FR
m_bezierCtrl2Y.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
m_angle.SetUnits( EDA_UNITS::DEGREES );
m_AngleValidator.SetRange( -359.9, 359.9 );
m_angleCtrl->SetValidator( m_AngleValidator );
m_AngleValidator.SetWindow( m_angleCtrl );
// Do not allow locking items in the footprint editor
m_locked->Show( dynamic_cast<PCB_EDIT_FRAME*>( aParent ) != nullptr );
@ -189,7 +181,7 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow()
case SHAPE_T::ARC:
SetTitle( _( "Arc Properties" ) );
m_AngleValue = m_item->GetArcAngle() / 10.0;
m_angle.SetDoubleValue( m_item->GetArcAngle() );
m_filledCtrl->Show( false );
break;
@ -310,7 +302,8 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow()
if( m_item->GetShape() == SHAPE_T::ARC )
{
VECTOR2D center = CalcArcCenter( m_item->GetStart(), m_item->GetEnd(), m_AngleValue );
VECTOR2D center = CalcArcCenter( m_item->GetStart(), m_item->GetEnd(),
m_angle.GetDoubleValue() / 10.0 );
m_item->SetCenter( wxPoint( KiROUND( center.x ), KiROUND( center.y ) ) );
}