diff --git a/pcbnew/controle.cpp b/pcbnew/controle.cpp index 9068ece878..5189c4ef5f 100644 --- a/pcbnew/controle.cpp +++ b/pcbnew/controle.cpp @@ -55,7 +55,8 @@ extern bool Magnetize( BOARD* m_Pcb, PCB_EDIT_FRAME* frame, */ static BOARD_ITEM* AllAreModulesAndReturnSmallestIfSo( GENERAL_COLLECTOR* aCollector ) { - int count = aCollector->GetCount(); + int count = aCollector->GetPrimaryCount(); // try to use preferred layer + if( 0 == count ) count = aCollector->GetCount(); for( int i = 0; i