Commit 898e4e26 authored by Maciej Suminski's avatar Maciej Suminski

Fixed the only-type condition for empty selection case.

parent e6c1254d
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment