From f2efb9c6019b62fce08c2fa212eb66bac6d2a379 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 25 Nov 2022 16:17:20 +0100 Subject: [PATCH] Make symbol highlighting from Symbol Fields Table working again. Fixes #13003 https://gitlab.com/kicad/code/kicad/issues/13003 --- eeschema/dialogs/dialog_symbol_fields_table.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/eeschema/dialogs/dialog_symbol_fields_table.cpp b/eeschema/dialogs/dialog_symbol_fields_table.cpp index 566c75ba14..5b4e06b045 100644 --- a/eeschema/dialogs/dialog_symbol_fields_table.cpp +++ b/eeschema/dialogs/dialog_symbol_fields_table.cpp @@ -1120,7 +1120,7 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnRemoveField( wxCommandEvent& event ) wxString confirm_msg = wxString::Format( _( "Are you sure you want to remove the field '%s'?" ), fieldName ); - + if( !IsOK( this, confirm_msg ) ) return; @@ -1142,7 +1142,7 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnRemoveField( wxCommandEvent& event ) wxGridTableMessage msg( m_dataModel, wxGRIDTABLE_NOTIFY_COLS_DELETED, m_fieldsCtrl->GetItemCount(), 1 ); - + m_grid->ProcessTableMessage( msg ); // set up attributes on the new quantities column @@ -1311,10 +1311,9 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnTableCellClick( wxGridEvent& event ) { SCH_EDITOR_CONTROL* editor = m_parent->GetToolManager()->GetTool(); - wxString path = refs[0].GetPath(); + // search and highlight the symbol found by reference wxString reference = refs[0].GetRef() + refs[0].GetRefNumber(); - - editor->FindSymbolAndItem( &path, &reference, true, HIGHLIGHT_SYMBOL, wxEmptyString ); + editor->FindSymbolAndItem( nullptr, &reference, true, HIGHLIGHT_SYMBOL, wxEmptyString ); } } else