Remove special-case processing of ${REFERENCE} and ${VALUE}.
Fixes https://gitlab.com/kicad/code/kicad/issues/11476
(cherry picked from commit 6b557d8631
)
This commit is contained in:
parent
362eec7ee3
commit
71ea56dea4
|
@ -427,20 +427,14 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataFromWindow()
|
||||||
// Go through all other footprint items
|
// Go through all other footprint items
|
||||||
for( BOARD_ITEM* boardItem : fp->GraphicalItems() )
|
for( BOARD_ITEM* boardItem : fp->GraphicalItems() )
|
||||||
{
|
{
|
||||||
if( boardItem->Type() == PCB_FP_TEXT_T )
|
KICAD_T itemType = boardItem->Type();
|
||||||
{
|
|
||||||
// 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}" ) )
|
if( itemType == PCB_FP_TEXT_T )
|
||||||
visitItem( commit, boardItem );
|
{
|
||||||
else if( m_values->GetValue() && text == wxT( "${VALUE}" ) )
|
if( m_otherFields->GetValue() )
|
||||||
visitItem( commit, boardItem );
|
|
||||||
else if( m_otherFields->GetValue() )
|
|
||||||
visitItem( commit, boardItem );
|
visitItem( commit, boardItem );
|
||||||
}
|
}
|
||||||
else if( boardItem->Type() == PCB_FP_SHAPE_T )
|
else if( itemType == PCB_FP_SHAPE_T )
|
||||||
{
|
{
|
||||||
if( m_footprintGraphics->GetValue() )
|
if( m_footprintGraphics->GetValue() )
|
||||||
visitItem( commit, boardItem );
|
visitItem( commit, boardItem );
|
||||||
|
|
Loading…
Reference in New Issue