From 960ea566d63758cafc7585ef0530fbfad5b98226 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 13 Jan 2015 09:33:17 +0100 Subject: [PATCH] Cvpcb: minor fixes. --- cvpcb/autosel.cpp | 9 ++++++--- cvpcb/dialogs/dialog_config_equfiles.cpp | 2 +- cvpcb/dialogs/dialog_config_equfiles_base.cpp | 2 +- cvpcb/dialogs/dialog_config_equfiles_base.fbp | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cvpcb/autosel.cpp b/cvpcb/autosel.cpp index 11408b98fa..a6419aa745 100644 --- a/cvpcb/autosel.cpp +++ b/cvpcb/autosel.cpp @@ -220,9 +220,12 @@ void CVPCB_MAINFRAME::AutomaticFootprintMatching( wxCommandEvent& event ) unsigned next = idx+1; unsigned previous = idx-1; - if( next < equiv_List.size() && previous >= 0 && - ( equivItem.m_ComponentValue == equiv_List[next].m_ComponentValue || - equivItem.m_ComponentValue == equiv_List[previous].m_ComponentValue ) ) + if( next < equiv_List.size() && + equivItem.m_ComponentValue == equiv_List[next].m_ComponentValue ) + equ_is_unique = false; + + if( previous >= 0 && + equivItem.m_ComponentValue == equiv_List[previous].m_ComponentValue ) equ_is_unique = false; // If the equivalence is unique, no ambiguity: use the association diff --git a/cvpcb/dialogs/dialog_config_equfiles.cpp b/cvpcb/dialogs/dialog_config_equfiles.cpp index 7163e9f3dd..935b333bfd 100644 --- a/cvpcb/dialogs/dialog_config_equfiles.cpp +++ b/cvpcb/dialogs/dialog_config_equfiles.cpp @@ -277,7 +277,7 @@ void DIALOG_CONFIG_EQUFILES::OnAddFiles( wxCommandEvent& event ) else { wxString msg; - msg.Printf( _( "File '%s'already in list" ), equFilename.GetData() ); + msg.Printf( _( "File '%s' already exists in list" ), equFilename.GetData() ); DisplayError( this, msg ); } } diff --git a/cvpcb/dialogs/dialog_config_equfiles_base.cpp b/cvpcb/dialogs/dialog_config_equfiles_base.cpp index 4124ec221d..ac8c14178e 100644 --- a/cvpcb/dialogs/dialog_config_equfiles_base.cpp +++ b/cvpcb/dialogs/dialog_config_equfiles_base.cpp @@ -17,7 +17,7 @@ DIALOG_CONFIG_EQUFILES_BASE::DIALOG_CONFIG_EQUFILES_BASE( wxWindow* parent, wxWi bMainSizer = new wxBoxSizer( wxVERTICAL ); wxStaticBoxSizer* sbEquivChoiceSizer; - sbEquivChoiceSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprint alias files (.equ files)") ), wxHORIZONTAL ); + sbEquivChoiceSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprint/Component equ files (.equ files)") ), wxHORIZONTAL ); wxBoxSizer* bSizerFlist; bSizerFlist = new wxBoxSizer( wxVERTICAL ); diff --git a/cvpcb/dialogs/dialog_config_equfiles_base.fbp b/cvpcb/dialogs/dialog_config_equfiles_base.fbp index 31b4c265e4..ca95492c77 100644 --- a/cvpcb/dialogs/dialog_config_equfiles_base.fbp +++ b/cvpcb/dialogs/dialog_config_equfiles_base.fbp @@ -99,7 +99,7 @@ 1 wxID_ANY - Footprint alias files (.equ files) + Footprint/Component equ files (.equ files) sbEquivChoiceSizer wxHORIZONTAL