Remove special-case processing of ${REFERENCE} and ${VALUE}.

Fixes https://gitlab.com/kicad/code/kicad/issues/11476
This commit is contained in:
Jeff Young 2022-04-30 23:00:58 +01:00
parent d16a3573f6
commit 6b557d8631
1 changed files with 1 additions and 14 deletions

View File

@ -509,20 +509,7 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataFromWindow()
{ {
KICAD_T itemType = boardItem->Type(); KICAD_T itemType = boardItem->Type();
if( itemType == PCB_FP_TEXT_T ) if( itemType == PCB_FP_TEXT_T || itemType == PCB_FP_TEXTBOX_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<EDA_TEXT*>( 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( m_otherFields->GetValue() ) if( m_otherFields->GetValue() )
visitItem( commit, boardItem ); visitItem( commit, boardItem );