|
|
@ -135,7 +135,7 @@ bool SELECTION::HasType( KICAD_T aType ) const |
|
|
|
{ |
|
|
|
for( const EDA_ITEM* item : m_items ) |
|
|
|
{ |
|
|
|
if( item->Type() == aType ) |
|
|
|
if( item->IsType( { aType } ) ) |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
@ -149,7 +149,7 @@ size_t SELECTION::CountType( KICAD_T aType ) const |
|
|
|
|
|
|
|
for( const EDA_ITEM* item : m_items ) |
|
|
|
{ |
|
|
|
if( item->Type() == aType ) |
|
|
|
if( item->IsType( { aType } ) ) |
|
|
|
count++; |
|
|
|
} |
|
|
|
|
|
|
@ -183,18 +183,7 @@ bool SELECTION::OnlyContains( std::vector<KICAD_T> aList ) const |
|
|
|
return ( std::all_of( m_items.begin(), m_items.end(), |
|
|
|
[&]( const EDA_ITEM* r ) |
|
|
|
{ |
|
|
|
bool ok = false; |
|
|
|
|
|
|
|
for( const KICAD_T& type : aList ) |
|
|
|
{ |
|
|
|
if( r->Type() == type ) |
|
|
|
{ |
|
|
|
ok = true; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return ok; |
|
|
|
return r->IsType( aList ); |
|
|
|
} ) ); |
|
|
|
} |
|
|
|
|
|
|
|