Make Pcbnew search about zone names, fixes #6951
I put zones in "other text items" category of searching as I thought it would be the appropriate one. Fixes https://gitlab.com/kicad/code/kicad/issues/6951
This commit is contained in:
parent
1eee72ec65
commit
dd328d230b
|
@ -257,6 +257,15 @@ void DIALOG_FIND::search( bool aDirection )
|
|||
m_hitList.push_back( textItem );
|
||||
}
|
||||
}
|
||||
|
||||
for( BOARD_ITEM* item : m_frame->GetBoard()->Zones() )
|
||||
{
|
||||
ZONE* zoneItem = dynamic_cast<ZONE*>( item );
|
||||
if( zoneItem && zoneItem->Matches( m_frame->GetFindReplaceData(), nullptr ) )
|
||||
{
|
||||
m_hitList.push_back( zoneItem );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -131,6 +131,11 @@ public:
|
|||
wxString GetZoneName() const { return m_zoneName; }
|
||||
void SetZoneName( const wxString& aName ) { m_zoneName = aName; }
|
||||
|
||||
bool Matches( wxFindReplaceData& aSearchData, void* aAuxData ) override
|
||||
{
|
||||
return BOARD_ITEM::Matches( GetZoneName(), aSearchData );
|
||||
}
|
||||
|
||||
/**
|
||||
* Function GetBoundingBox (virtual)
|
||||
* @return an EDA_RECT that is the bounding box of the zone outline
|
||||
|
|
Loading…
Reference in New Issue