Commit 443b4a6f authored by Vladimir Ur's avatar Vladimir Ur

PCBNEW favored module placed on OPPOSITE side selected layer become.

Now it select module from selected side if present. Especially handy in contrast view.
parent 32526511
......@@ -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;
......
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