PCBNEW favored module placed on OPPOSITE side selected layer become.

Now it select module from selected side if present. Especially handy in contrast view.
This commit is contained in:
Vladimir Ur 2011-10-27 17:01:32 +04:00
parent 32526511de
commit 443b4a6fe1
1 changed files with 3 additions and 2 deletions

View File

@ -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<count; ++i )
{
@ -77,7 +78,7 @@ static BOARD_ITEM* AllAreModulesAndReturnSmallestIfSo( GENERAL_COLLECTOR* aColle
int lmin = MIN( lx, ly );
if( lmin <= minDim )
if( lmin < minDim )
{
minDim = lmin;
minNdx = i;