pcb_calculator: fix locale fp separator and incorrect coding of utf8 strings.
This commit is contained in:
parent
bcc3767c2a
commit
11bc23fab2
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011-2014 Jean-Pierre Charras
|
* Copyright (C) 2011-2014 Jean-Pierre Charras
|
||||||
* Copyright (C) 2004-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 2004-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,11 +18,11 @@
|
||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* @file units_scales.h
|
* @file units_scales.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Inside calculations, units are always meter, Hz, Ohm and Radian
|
// Inside calculations, units are always meter, Hz, Ohm and Radian
|
||||||
// These units are not very easy to handle, so we use conversion constants
|
// These units are not very easy to handle, so we use conversion constants
|
||||||
|
|
||||||
#ifndef UNITS_SCALES_H
|
#ifndef UNITS_SCALES_H
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This program source code file is part of KICAD, a free EDA CAD application.
|
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 1992-2019 Kicad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 1992-2021 Kicad Developers, see AUTHORS.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -102,24 +102,25 @@ void PCB_CALCULATOR_FRAME::onUpdateViaCalcErrorText( wxUpdateUIEvent& event )
|
||||||
void PCB_CALCULATOR_FRAME::OnViaResetButtonClick( wxCommandEvent& event )
|
void PCB_CALCULATOR_FRAME::OnViaResetButtonClick( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
#define DEFAULT_UNIT_SEL_MM 0
|
#define DEFAULT_UNIT_SEL_MM 0
|
||||||
|
#define DEFAULT_UNIT_SEL_OHM 0
|
||||||
|
|
||||||
m_textCtrlHoleDia->SetValue( wxT( "0.4" ) );
|
m_textCtrlHoleDia->SetValue( wxString::Format( "%g", 0.4 ) );
|
||||||
m_choiceHoleDia->SetSelection( DEFAULT_UNIT_SEL_MM );
|
m_choiceHoleDia->SetSelection( DEFAULT_UNIT_SEL_MM );
|
||||||
m_textCtrlPlatingThickness->SetValue( wxT( "0.035" ) );
|
m_textCtrlPlatingThickness->SetValue( wxString::Format( "%g", 0.035 ) );
|
||||||
m_choicePlatingThickness->SetSelection( DEFAULT_UNIT_SEL_MM );
|
m_choicePlatingThickness->SetSelection( DEFAULT_UNIT_SEL_MM );
|
||||||
m_textCtrlViaLength->SetValue( wxT( "1.6" ) );
|
m_textCtrlViaLength->SetValue( wxString::Format( "%g", 1.6 ) );
|
||||||
m_choiceViaLength->SetSelection( DEFAULT_UNIT_SEL_MM );
|
m_choiceViaLength->SetSelection( DEFAULT_UNIT_SEL_MM );
|
||||||
m_textCtrlViaPadDia->SetValue( wxT( "0.6" ) );
|
m_textCtrlViaPadDia->SetValue( wxString::Format( "%g", 0.6 ) );
|
||||||
m_choiceViaPadDia->SetSelection( DEFAULT_UNIT_SEL_MM );
|
m_choiceViaPadDia->SetSelection( DEFAULT_UNIT_SEL_MM );
|
||||||
m_textCtrlClearanceDia->SetValue( wxT( "1.0" ) );
|
m_textCtrlClearanceDia->SetValue( wxString::Format( "%g", 1.0 ) );
|
||||||
m_choiceClearanceDia->SetSelection( DEFAULT_UNIT_SEL_MM );
|
m_choiceClearanceDia->SetSelection( DEFAULT_UNIT_SEL_MM );
|
||||||
m_textCtrlImpedance->SetValue( wxT( "50" ) );
|
m_textCtrlImpedance->SetValue( wxString::Format( "%g", 50.0 ) );
|
||||||
m_choiceImpedance->SetSelection( DEFAULT_UNIT_SEL_MM );
|
m_choiceImpedance->SetSelection( DEFAULT_UNIT_SEL_OHM );
|
||||||
m_textCtrlAppliedCurrent->SetValue( wxT( "1" ) );
|
m_textCtrlAppliedCurrent->SetValue( wxString::Format( "%g", 1.0 ) );
|
||||||
m_textCtrlPlatingResistivity->SetValue( wxT( "1.72e-8" ) );
|
m_textCtrlPlatingResistivity->SetValue( wxString::Format( "%g", 1.72e-8 ) );
|
||||||
m_textCtrlPlatingPermittivity->SetValue( wxT( "4.5" ) );
|
m_textCtrlPlatingPermittivity->SetValue( wxString::Format( "%g", 4.5 ) );
|
||||||
m_textCtrlTemperatureDiff->SetValue( wxT( "10" ) );
|
m_textCtrlTemperatureDiff->SetValue( wxString::Format( "%g", 10.0 ) );
|
||||||
m_textCtrlRiseTime->SetValue( wxT( "1" ) );
|
m_textCtrlRiseTime->SetValue( wxString::Format( "%g", 1.0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011-2014 Jean-Pierre Charras
|
* Copyright (C) 2011-2014 Jean-Pierre Charras
|
||||||
* Copyright (C) 2004-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 2004-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -151,8 +151,8 @@ UNIT_SELECTOR_RESISTOR::UNIT_SELECTOR_RESISTOR( wxWindow *parent, wxWindowID id,
|
||||||
const wxArrayString& choices, long style )
|
const wxArrayString& choices, long style )
|
||||||
: UNIT_SELECTOR( parent, id, pos, size, choices, style )
|
: UNIT_SELECTOR( parent, id, pos, size, choices, style )
|
||||||
{
|
{
|
||||||
Append( _( "Ω" ) );
|
Append( wxT( "Ω" ) );
|
||||||
Append( _( "kΩ" ) );
|
Append( wxT( "kΩ" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue