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 )
|
bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData )
|
||||||
{
|
{
|
||||||
wxString text = GetFullyQualifiedText();
|
wxString text = GetFullyQualifiedText();
|
||||||
|
int flags = aSearchData.GetFlags();
|
||||||
|
|
||||||
// User defined fields have an ID of -1.
|
// User defined fields have an ID of -1.
|
||||||
if( ((m_id > VALUE || m_id < REFERENCE) && !(aSearchData.GetFlags() & FR_SEARCH_ALL_FIELDS))
|
if( m_id != REFERENCE && m_id != VALUE && !( flags & FR_SEARCH_ALL_FIELDS ) )
|
||||||
|| ((m_id == REFERENCE) && !(aSearchData.GetFlags() & FR_REPLACE_REFERENCES)) )
|
return false;
|
||||||
{
|
|
||||||
|
if( ( flags & FR_SEARCH_REPLACE ) && m_id == REFERENCE && !( flags & FR_REPLACE_REFERENCES ) )
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
wxLogTrace( traceFindItem, wxT( " child item " ) + GetSelectMenuText( MILLIMETRES ) );
|
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
|
SCH_COMPONENT* SCH_PIN::GetParentComponent() const
|
||||||
{
|
{
|
||||||
return static_cast<SCH_COMPONENT*>( GetParent() );
|
return static_cast<SCH_COMPONENT*>( GetParent() );
|
||||||
|
|
|
@ -84,6 +84,7 @@ public:
|
||||||
/// Returns the pin's position in global coordinates
|
/// Returns the pin's position in global coordinates
|
||||||
wxPoint GetTransformedPosition() const;
|
wxPoint GetTransformedPosition() const;
|
||||||
|
|
||||||
|
bool Matches( wxFindReplaceData& aSearchData, void* aAuxData ) override;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* While many of these are currently simply covers for the equivalent LIB_PIN methods,
|
* While many of these are currently simply covers for the equivalent LIB_PIN methods,
|
||||||
|
|
Loading…
Reference in New Issue