From 6b557d863191ac3e5a9af451b5b46190227a7a90 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 30 Apr 2022 23:00:58 +0100 Subject: [PATCH] Remove special-case processing of ${REFERENCE} and ${VALUE}. Fixes https://gitlab.com/kicad/code/kicad/issues/11476 --- .../dialog_global_edit_text_and_graphics.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp b/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp index 7267e57528..d9041a4393 100644 --- a/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp +++ b/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp @@ -509,20 +509,7 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataFromWindow() { KICAD_T itemType = boardItem->Type(); - if( itemType == PCB_FP_TEXT_T ) - { - // We are guaranteed to always get an EDA_TEXT in this statement, but we must - // use the dynamic_cast to move through the type tree anyway. - const wxString text = dynamic_cast( boardItem )->GetText(); - - if( m_references->GetValue() && text == wxT( "${REFERENCE}" ) ) - visitItem( commit, boardItem ); - else if( m_values->GetValue() && text == wxT( "${VALUE}" ) ) - visitItem( commit, boardItem ); - else if( m_otherFields->GetValue() ) - visitItem( commit, boardItem ); - } - else if( itemType == PCB_FP_TEXTBOX_T ) + if( itemType == PCB_FP_TEXT_T || itemType == PCB_FP_TEXTBOX_T ) { if( m_otherFields->GetValue() ) visitItem( commit, boardItem );