mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 18:23:15 +02:00
Allow full-field filtering in lib_fields_table_editor
This commit is contained in:
parent
f7fd832c67
commit
5c865cab36
@ -735,13 +735,31 @@ void LIB_FIELDS_EDITOR_GRID_DATA_MODEL::RebuildRows()
|
|||||||
|
|
||||||
wxLogTrace( traceLibFieldTable, "RebuildRows: About to process %zu symbols", m_symbolsList.size() );
|
wxLogTrace( traceLibFieldTable, "RebuildRows: About to process %zu symbols", m_symbolsList.size() );
|
||||||
|
|
||||||
for( LIB_SYMBOL* ref : m_symbolsList )
|
for( LIB_SYMBOL* ref : m_symbolsList )
|
||||||
{
|
{
|
||||||
wxLogTrace( traceLibFieldTable, "RebuildRows: Processing symbol '%s' (UUID: %s)",
|
wxLogTrace( traceLibFieldTable, "RebuildRows: Processing symbol '%s' (UUID: %s)",
|
||||||
ref->GetName(), ref->m_Uuid.AsString() );
|
ref->GetName(), ref->m_Uuid.AsString() );
|
||||||
|
|
||||||
if( !m_filter.IsEmpty() && !WildCompareString( m_filter, ref->GetValue( false, nullptr, false ), false ) )
|
if( !m_filter.IsEmpty() )
|
||||||
continue;
|
{
|
||||||
|
bool match = false;
|
||||||
|
|
||||||
|
std::map<wxString, LIB_DATA_ELEMENT>& fieldStore = m_dataStore[ref->m_Uuid];
|
||||||
|
|
||||||
|
for( const LIB_DATA_MODEL_COL& col : m_cols )
|
||||||
|
{
|
||||||
|
auto it = fieldStore.find( col.m_fieldName );
|
||||||
|
|
||||||
|
if( it != fieldStore.end() && WildCompareString( m_filter, it->second.m_currentData, false ) )
|
||||||
|
{
|
||||||
|
match = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !match )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
bool matchFound = false;
|
bool matchFound = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user