From 4b137bbaea4dce41c81b5fba8ee047b444680a77 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 13 Apr 2025 15:06:14 +0100 Subject: [PATCH] Handle ref & value proxies as if they were refs and values. --- .../dialog_global_edit_text_and_graphics.cpp | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp b/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp index b4be701397..280d849f6d 100644 --- a/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp +++ b/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp @@ -555,18 +555,20 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataFromWindow() if( m_values->GetValue() ) visitItem( commit, &fp->Value() ); - if( m_otherFootprintFields->GetValue() ) + for( PCB_FIELD* field : fp->GetFields() ) { - for( PCB_FIELD* field : fp->GetFields() ) - { - if( field->IsReference() ) - continue; + if( field->IsReference() ) + continue; - if( field->IsValue() ) - continue; + if( field->IsValue() ) + continue; + if( m_otherFootprintFields->GetValue() ) + visitItem( commit, field ); + else if( m_references->GetValue() && field->GetText() == wxT( "${REFERENCE}" ) ) + visitItem( commit, field ); + else if( m_values->GetValue() && field->GetText() == wxT( "${VALUE}" ) ) visitItem( commit, field ); - } } // Go through all other footprint items @@ -576,8 +578,14 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataFromWindow() if( itemType == PCB_TEXT_T || itemType == PCB_TEXTBOX_T ) { + EDA_TEXT* textItem = dynamic_cast( boardItem ); + if( m_footprintTexts->GetValue() ) visitItem( commit, boardItem ); + else if( m_references->GetValue() && textItem->GetText() == wxT( "${REFERENCE}" ) ) + visitItem( commit, boardItem ); + else if( m_values->GetValue() && textItem->GetText() == wxT( "${VALUE}" ) ) + visitItem( commit, boardItem ); } else if( BaseType( itemType ) == PCB_DIMENSION_T ) {