Re-allow moving footprint text

This is a temporary solution until we modify loading to convert existing
text to fields

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17899
This commit is contained in:
Seth Hillbrand 2024-05-02 12:59:28 -07:00
parent b0c9df3ff4
commit b649932dbf
1 changed files with 15 additions and 1 deletions

View File

@ -2843,8 +2843,22 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
// Most footprint children can only be selected in the footprint editor.
if( aItem->GetParentFootprint() && !m_isFootprintEditor && !checkVisibilityOnly )
{
if( aItem->Type() != PCB_FIELD_T && aItem->Type() != PCB_PAD_T )
if( aItem->Type() == PCB_TEXT_T )
{
text = static_cast<const PCB_TEXT*>( aItem );
// Special case for version 8 until we have a consistent way to convert these text
// to fields
if( !text->GetText().Contains( wxT( "${REFERENCE}" ) )
&& !text->GetText().Contains( wxT( "${VALUE}" ) ) )
{
return false;
}
}
else if( aItem->Type() != PCB_FIELD_T && aItem->Type() != PCB_PAD_T )
{
return false;
}
}
switch( aItem->Type() )