Fix issues with schematic find/change.
Fixes: lp:1831006 * https://bugs.launchpad.net/kicad/+bug/1831006
This commit is contained in:
parent
d2daab808c
commit
0a01277808
|
@ -321,13 +321,14 @@ void SCH_FIELD::Place( SCH_EDIT_FRAME* frame, wxDC* DC )
|
|||
bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData )
|
||||
{
|
||||
wxString text = GetFullyQualifiedText();
|
||||
int flags = aSearchData.GetFlags();
|
||||
|
||||
// User defined fields have an ID of -1.
|
||||
if( ((m_id > VALUE || m_id < REFERENCE) && !(aSearchData.GetFlags() & FR_SEARCH_ALL_FIELDS))
|
||||
|| ((m_id == REFERENCE) && !(aSearchData.GetFlags() & FR_REPLACE_REFERENCES)) )
|
||||
{
|
||||
if( m_id != REFERENCE && m_id != VALUE && !( flags & FR_SEARCH_ALL_FIELDS ) )
|
||||
return false;
|
||||
|
||||
if( ( flags & FR_SEARCH_REPLACE ) && m_id == REFERENCE && !( flags & FR_REPLACE_REFERENCES ) )
|
||||
return false;
|
||||
}
|
||||
|
||||
wxLogTrace( traceFindItem, wxT( " child item " ) + GetSelectMenuText( MILLIMETRES ) );
|
||||
|
||||
|
|
|
@ -55,6 +55,12 @@ SCH_PIN& SCH_PIN::operator=( const SCH_PIN& aPin )
|
|||
}
|
||||
|
||||
|
||||
bool SCH_PIN::Matches( wxFindReplaceData& aSearchData, void* aAuxData )
|
||||
{
|
||||
return m_libPin->Matches( aSearchData, aAuxData );
|
||||
}
|
||||
|
||||
|
||||
SCH_COMPONENT* SCH_PIN::GetParentComponent() const
|
||||
{
|
||||
return static_cast<SCH_COMPONENT*>( GetParent() );
|
||||
|
|
|
@ -84,6 +84,7 @@ public:
|
|||
/// Returns the pin's position in global coordinates
|
||||
wxPoint GetTransformedPosition() const;
|
||||
|
||||
bool Matches( wxFindReplaceData& aSearchData, void* aAuxData ) override;
|
||||
|
||||
/*
|
||||
* While many of these are currently simply covers for the equivalent LIB_PIN methods,
|
||||
|
|
Loading…
Reference in New Issue