diff --git a/pcb_calculator/colorcode.cpp b/pcb_calculator/colorcode.cpp index d102461043..a14569ba83 100644 --- a/pcb_calculator/colorcode.cpp +++ b/pcb_calculator/colorcode.cpp @@ -36,25 +36,27 @@ void PCB_CALCULATOR_FRAME::OnToleranceSelection( wxCommandEvent& event ) void PCB_CALCULATOR_FRAME::ToleranceSelection( int aSelection ) { - /* For tolerance = 5 or 10 %, there are 3 ring for the value - * but for tolerance < 5 %, there are 4 ring + /* For tolerance = 5 or 10 %, there are 3 bands for the value + * but for tolerance < 5 %, there are 4 bands */ - bool enable = true; + bool show4thBand; switch( aSelection ) { - case 0: - case 1: - enable = false; + case 0: // 5 or 10 % + show4thBand = false; break; - - default: + case 1: // < 5 % + show4thBand = true; + break; + default: // Show 4th band if something went wrong + show4thBand = true; break; } bool oldstate = m_Band4Label->IsShown(); - if( oldstate != enable ) + if( oldstate != show4thBand ) { - m_Band4bitmap->Show(enable); - m_Band4Label->Show(enable); + m_Band4bitmap->Show(show4thBand); + m_Band4Label->Show(show4thBand); // m_Band4Label visibility has changed: // The new size must be taken in account m_panelColorCode->GetSizer()->Layout(); diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp index 93ca9dd426..b90b423762 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.cpp @@ -1176,7 +1176,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow wxBoxSizer* bSizerPanelColorCode; bSizerPanelColorCode = new wxBoxSizer( wxHORIZONTAL ); - wxString m_rbToleranceSelectionChoices[] = { _("10%"), _("5%"), _("2%"), _("1%"), _("0.5%"), _("0.25%"), _("0.1%"), _("0.05%") }; + wxString m_rbToleranceSelectionChoices[] = { _("10% / 5%"), _("<= 2%") }; int m_rbToleranceSelectionNChoices = sizeof( m_rbToleranceSelectionChoices ) / sizeof( wxString ); m_rbToleranceSelection = new wxRadioBox( m_panelColorCode, wxID_ANY, _("Tolerance"), wxDefaultPosition, wxDefaultSize, m_rbToleranceSelectionNChoices, m_rbToleranceSelectionChoices, 1, wxRA_SPECIFY_COLS ); m_rbToleranceSelection->SetSelection( 0 ); @@ -1199,7 +1199,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow m_staticText35->Wrap( -1 ); fgSizerColoCode->Add( m_staticText35, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_Band4Label = new wxStaticText( m_panelColorCode, wxID_ANY, _("4rd Band"), wxDefaultPosition, wxDefaultSize, 0 ); + m_Band4Label = new wxStaticText( m_panelColorCode, wxID_ANY, _("4th Band"), wxDefaultPosition, wxDefaultSize, 0 ); m_Band4Label->Wrap( -1 ); fgSizerColoCode->Add( m_Band4Label, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); diff --git a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp index 96663d10c4..5267723099 100644 --- a/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp +++ b/pcb_calculator/dialogs/pcb_calculator_frame_base.fbp @@ -17732,7 +17732,7 @@ 1 0 - "10%" "5%" "2%" "1%" "0.5%" "0.25%" "0.1%" "0.05%" + "10% / 5%" "<= 2%" 1 1 @@ -18101,7 +18101,7 @@ 0 0 wxID_ANY - 4rd Band + 4th Band 0