From b60a7e2acaa88bd75dd16fbb0ad42a95e0ce2528 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 18 Aug 2020 20:13:16 +0200 Subject: [PATCH] Eeschema: fix crash in DIALOG_CHANGE_SYMBOLS when run Update Library Symbols. Probably due to a typo. Fix also a minor wxWidgets alert in this dialog --- eeschema/dialogs/dialog_change_symbols.cpp | 6 ++++-- eeschema/dialogs/dialog_change_symbols_base.cpp | 6 +++--- eeschema/dialogs/dialog_change_symbols_base.fbp | 6 ++---- eeschema/dialogs/dialog_change_symbols_base.h | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/eeschema/dialogs/dialog_change_symbols.cpp b/eeschema/dialogs/dialog_change_symbols.cpp index 9137dc98f5..90f181411a 100644 --- a/eeschema/dialogs/dialog_change_symbols.cpp +++ b/eeschema/dialogs/dialog_change_symbols.cpp @@ -262,14 +262,16 @@ bool DIALOG_CHANGE_SYMBOLS::processMatchingSymbols() for( auto i : symbolsToProcess ) { + SCH_COMPONENT* symbol = i.first; + if( m_mode == MODE::UPDATE ) { - if( processSymbol( i.first, i.second, m_symbol->GetLibId(), appendToUndo ) ) + if( processSymbol( symbol, i.second, symbol->GetLibId(), appendToUndo ) ) changed = true; } else { - if( processSymbol( i.first, i.second, newId, appendToUndo ) ) + if( processSymbol( symbol, i.second, newId, appendToUndo ) ) changed = true; } diff --git a/eeschema/dialogs/dialog_change_symbols_base.cpp b/eeschema/dialogs/dialog_change_symbols_base.cpp index 444a4fd319..dd0e7e3231 100644 --- a/eeschema/dialogs/dialog_change_symbols_base.cpp +++ b/eeschema/dialogs/dialog_change_symbols_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) +// C++ code generated with wxFormBuilder (version Jul 10 2019) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -40,7 +40,7 @@ DIALOG_CHANGE_SYMBOLS_BASE::DIALOG_CHANGE_SYMBOLS_BASE( wxWindow* parent, wxWind m_matchSizer->Add( m_specifiedValue, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_matchById = new wxRadioButton( this, wxID_ANY, _("%s by library indentifier:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_matchSizer->Add( m_matchById, wxGBPosition( 4, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL, 5 ); + m_matchSizer->Add( m_matchById, wxGBPosition( 4, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); m_specifiedId = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); m_matchSizer->Add( m_specifiedId, wxGBPosition( 5, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT, 5 ); @@ -59,7 +59,7 @@ DIALOG_CHANGE_SYMBOLS_BASE::DIALOG_CHANGE_SYMBOLS_BASE( wxWindow* parent, wxWind wxStaticText* m_newIdLabel; m_newIdLabel = new wxStaticText( this, wxID_ANY, _("New library identifier:"), wxDefaultPosition, wxDefaultSize, 0 ); m_newIdLabel->Wrap( -1 ); - m_newIdSizer->Add( m_newIdLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); + m_newIdSizer->Add( m_newIdLabel, 0, wxLEFT, 5 ); wxBoxSizer* bSizer1; bSizer1 = new wxBoxSizer( wxHORIZONTAL ); diff --git a/eeschema/dialogs/dialog_change_symbols_base.fbp b/eeschema/dialogs/dialog_change_symbols_base.fbp index 823ec32a78..6e27a789c9 100644 --- a/eeschema/dialogs/dialog_change_symbols_base.fbp +++ b/eeschema/dialogs/dialog_change_symbols_base.fbp @@ -483,7 +483,7 @@ 5 2 0 - wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxTOP 4 1 @@ -630,7 +630,6 @@ - 0 @@ -704,7 +703,7 @@ protected 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT + wxLEFT 0 1 @@ -849,7 +848,6 @@ - 0 diff --git a/eeschema/dialogs/dialog_change_symbols_base.h b/eeschema/dialogs/dialog_change_symbols_base.h index df6921bad6..834b779f4a 100644 --- a/eeschema/dialogs/dialog_change_symbols_base.h +++ b/eeschema/dialogs/dialog_change_symbols_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) +// C++ code generated with wxFormBuilder (version Jul 10 2019) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE!