Fixed the only-type condition for empty selection case.
This commit is contained in:
parent
e6c1254dc8
commit
898e4e269e
|
@ -78,6 +78,9 @@ bool SELECTION_CONDITIONS::hasTypeFunc( const SELECTION& aSelection, KICAD_T aTy
|
|||
|
||||
bool SELECTION_CONDITIONS::onlyTypeFunc( const SELECTION& aSelection, KICAD_T aType )
|
||||
{
|
||||
if( aSelection.Empty() )
|
||||
return false;
|
||||
|
||||
for( int i = 0; i < aSelection.Size(); ++i )
|
||||
{
|
||||
if( aSelection.Item<EDA_ITEM>( i )->Type() != aType )
|
||||
|
|
Loading…
Reference in New Issue