From 7c48fad7370125c3ce549b425dc58bc399936c43 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 5 Feb 2018 19:46:55 +0000 Subject: [PATCH] Fix MSW issue with Exchange Footprints dialog. Fixes: lp:1747413 * https://bugs.launchpad.net/kicad/+bug/1747413 --- pcbnew/dialogs/dialog_exchange_modules.cpp | 5 +++++ pcbnew/dialogs/dialog_exchange_modules_base.cpp | 12 ++++++------ pcbnew/dialogs/dialog_exchange_modules_base.fbp | 12 ++++++------ pcbnew/dialogs/dialog_exchange_modules_base.h | 4 ---- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/pcbnew/dialogs/dialog_exchange_modules.cpp b/pcbnew/dialogs/dialog_exchange_modules.cpp index 150da70c46..0d8c977205 100644 --- a/pcbnew/dialogs/dialog_exchange_modules.cpp +++ b/pcbnew/dialogs/dialog_exchange_modules.cpp @@ -48,6 +48,11 @@ static bool RecreateCmpFile( BOARD * aBrd, const wxString& aFullCmpFileName ); +#define wxID_MATCH_FP_ALL 4200 +#define wxID_MATCH_FP_REF 4201 +#define wxID_MATCH_FP_VAL 4202 +#define wxID_MATCH_FP_ID 4203 + int DIALOG_EXCHANGE_MODULE::m_matchModeForUpdate = wxID_MATCH_FP_ALL; int DIALOG_EXCHANGE_MODULE::m_matchModeForExchange = wxID_MATCH_FP_REF; int DIALOG_EXCHANGE_MODULE::m_matchModeForUpdateSelected = wxID_MATCH_FP_REF; diff --git a/pcbnew/dialogs/dialog_exchange_modules_base.cpp b/pcbnew/dialogs/dialog_exchange_modules_base.cpp index 3d647416e3..1c68de61fb 100644 --- a/pcbnew/dialogs/dialog_exchange_modules_base.cpp +++ b/pcbnew/dialogs/dialog_exchange_modules_base.cpp @@ -21,18 +21,18 @@ DIALOG_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWi m_upperSizer->SetFlexibleDirection( wxBOTH ); m_upperSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_matchAll = new wxRadioButton( this, wxID_MATCH_FP_ALL, _("%s all footprints on board"), wxDefaultPosition, wxDefaultSize, 0 ); + m_matchAll = new wxRadioButton( this, wxID_ANY, _("%s all footprints on board"), wxDefaultPosition, wxDefaultSize, 0 ); m_matchAll->SetValue( true ); m_matchAll->SetMinSize( wxSize( -1,26 ) ); m_upperSizer->Add( m_matchAll, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_matchCurrentRef = new wxRadioButton( this, wxID_MATCH_FP_REF, _("%s current footprint (%s)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_matchCurrentRef = new wxRadioButton( this, wxID_ANY, _("%s current footprint (%s)"), wxDefaultPosition, wxDefaultSize, 0 ); m_matchCurrentRef->SetMinSize( wxSize( -1,26 ) ); m_upperSizer->Add( m_matchCurrentRef, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_matchSpecifiedRef = new wxRadioButton( this, wxID_MATCH_FP_REF, _("%s footprint with reference:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_matchSpecifiedRef = new wxRadioButton( this, wxID_ANY, _("%s footprint with reference:"), wxDefaultPosition, wxDefaultSize, 0 ); m_matchSpecifiedRef->SetMinSize( wxSize( -1,26 ) ); m_upperSizer->Add( m_matchSpecifiedRef, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 ); @@ -40,12 +40,12 @@ DIALOG_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWi m_specifiedRef = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_upperSizer->Add( m_specifiedRef, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxTOP|wxEXPAND, 5 ); - m_matchCurrentValue = new wxRadioButton( this, wxID_MATCH_FP_VAL, _("%s footprints with matching value (%s)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_matchCurrentValue = new wxRadioButton( this, wxID_ANY, _("%s footprints with matching value (%s)"), wxDefaultPosition, wxDefaultSize, 0 ); m_matchCurrentValue->SetMinSize( wxSize( -1,26 ) ); m_upperSizer->Add( m_matchCurrentValue, wxGBPosition( 3, 0 ), wxGBSpan( 1, 2 ), wxLEFT|wxRIGHT|wxEXPAND, 5 ); - m_matchSpecifiedValue = new wxRadioButton( this, wxID_MATCH_FP_VAL, _("%s footprints with value:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_matchSpecifiedValue = new wxRadioButton( this, wxID_ANY, _("%s footprints with value:"), wxDefaultPosition, wxDefaultSize, 0 ); m_matchSpecifiedValue->SetMinSize( wxSize( -1,26 ) ); m_upperSizer->Add( m_matchSpecifiedValue, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 ); @@ -53,7 +53,7 @@ DIALOG_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWi m_specifiedValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_upperSizer->Add( m_specifiedValue, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxRIGHT, 5 ); - m_matchSpecifiedID = new wxRadioButton( this, wxID_MATCH_FP_ID, _("%s footprints with identifier:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_matchSpecifiedID = new wxRadioButton( this, wxID_ANY, _("%s footprints with identifier:"), wxDefaultPosition, wxDefaultSize, 0 ); m_upperSizer->Add( m_matchSpecifiedID, wxGBPosition( 5, 0 ), wxGBSpan( 1, 2 ), wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5 ); wxFlexGridSizer* fgSizer1; diff --git a/pcbnew/dialogs/dialog_exchange_modules_base.fbp b/pcbnew/dialogs/dialog_exchange_modules_base.fbp index 1a3348e46c..b028165cf5 100644 --- a/pcbnew/dialogs/dialog_exchange_modules_base.fbp +++ b/pcbnew/dialogs/dialog_exchange_modules_base.fbp @@ -142,7 +142,7 @@ 0 0 - wxID_MATCH_FP_ALL + wxID_ANY %s all footprints on board 0 @@ -233,7 +233,7 @@ 0 0 - wxID_MATCH_FP_REF + wxID_ANY %s current footprint (%s) 0 @@ -324,7 +324,7 @@ 0 0 - wxID_MATCH_FP_REF + wxID_ANY %s footprint with reference: 0 @@ -509,7 +509,7 @@ 0 0 - wxID_MATCH_FP_VAL + wxID_ANY %s footprints with matching value (%s) 0 @@ -600,7 +600,7 @@ 0 0 - wxID_MATCH_FP_VAL + wxID_ANY %s footprints with value: 0 @@ -785,7 +785,7 @@ 0 0 - wxID_MATCH_FP_ID + wxID_ANY %s footprints with identifier: 0 diff --git a/pcbnew/dialogs/dialog_exchange_modules_base.h b/pcbnew/dialogs/dialog_exchange_modules_base.h index d5ac9c4f09..5c2e0e53ee 100644 --- a/pcbnew/dialogs/dialog_exchange_modules_base.h +++ b/pcbnew/dialogs/dialog_exchange_modules_base.h @@ -35,10 +35,6 @@ class WX_HTML_REPORT_PANEL; /////////////////////////////////////////////////////////////////////////// -#define wxID_MATCH_FP_ALL 4200 -#define wxID_MATCH_FP_REF 4201 -#define wxID_MATCH_FP_VAL 4202 -#define wxID_MATCH_FP_ID 4203 /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_EXCHANGE_MODULE_BASE