|  |  | @ -1104,6 +1104,7 @@ EDA_RECT BOARD::ComputeBoundingBox( bool aBoardEdgesOnly ) const | 
			
		
	
		
			
				
					|  |  |  | { | 
			
		
	
		
			
				
					|  |  |  |     bool hasItems = false; | 
			
		
	
		
			
				
					|  |  |  |     EDA_RECT area; | 
			
		
	
		
			
				
					|  |  |  |     LSET visible = GetVisibleLayers(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     // Check segments, dimensions, texts, and fiducials
 | 
			
		
	
		
			
				
					|  |  |  |     for( BOARD_ITEM* item = m_Drawings;  item;  item = item->Next() ) | 
			
		
	
	
		
			
				
					|  |  | @ -1111,6 +1112,9 @@ EDA_RECT BOARD::ComputeBoundingBox( bool aBoardEdgesOnly ) const | 
			
		
	
		
			
				
					|  |  |  |         if( aBoardEdgesOnly && (item->Type() != PCB_LINE_T || item->GetLayer() != Edge_Cuts ) ) | 
			
		
	
		
			
				
					|  |  |  |             continue; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         if( !( item->GetLayerSet() & visible ).any() ) | 
			
		
	
		
			
				
					|  |  |  |             continue; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         if( !hasItems ) | 
			
		
	
		
			
				
					|  |  |  |             area = item->GetBoundingBox(); | 
			
		
	
		
			
				
					|  |  |  |         else | 
			
		
	
	
		
			
				
					|  |  | @ -1124,6 +1128,9 @@ EDA_RECT BOARD::ComputeBoundingBox( bool aBoardEdgesOnly ) const | 
			
		
	
		
			
				
					|  |  |  |         // Check modules
 | 
			
		
	
		
			
				
					|  |  |  |         for( MODULE* module = m_Modules; module; module = module->Next() ) | 
			
		
	
		
			
				
					|  |  |  |         { | 
			
		
	
		
			
				
					|  |  |  |             if( !( module->GetLayerSet() & visible ).any() ) | 
			
		
	
		
			
				
					|  |  |  |                 continue; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             if( !hasItems ) | 
			
		
	
		
			
				
					|  |  |  |                 area = module->GetBoundingBox(); | 
			
		
	
		
			
				
					|  |  |  |             else | 
			
		
	
	
		
			
				
					|  |  | @ -1135,6 +1142,9 @@ EDA_RECT BOARD::ComputeBoundingBox( bool aBoardEdgesOnly ) const | 
			
		
	
		
			
				
					|  |  |  |         // Check tracks
 | 
			
		
	
		
			
				
					|  |  |  |         for( TRACK* track = m_Track; track; track = track->Next() ) | 
			
		
	
		
			
				
					|  |  |  |         { | 
			
		
	
		
			
				
					|  |  |  |             if( !( track->GetLayerSet() & visible ).any() ) | 
			
		
	
		
			
				
					|  |  |  |                 continue; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             if( !hasItems ) | 
			
		
	
		
			
				
					|  |  |  |                 area = track->GetBoundingBox(); | 
			
		
	
		
			
				
					|  |  |  |             else | 
			
		
	
	
		
			
				
					|  |  | @ -1146,6 +1156,9 @@ EDA_RECT BOARD::ComputeBoundingBox( bool aBoardEdgesOnly ) const | 
			
		
	
		
			
				
					|  |  |  |         // Check zones
 | 
			
		
	
		
			
				
					|  |  |  |         for( auto aZone : m_ZoneDescriptorList ) | 
			
		
	
		
			
				
					|  |  |  |         { | 
			
		
	
		
			
				
					|  |  |  |             if( !( aZone->GetLayerSet() & visible ).any() ) | 
			
		
	
		
			
				
					|  |  |  |                 continue; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             if( !hasItems ) | 
			
		
	
		
			
				
					|  |  |  |                 area = aZone->GetBoundingBox(); | 
			
		
	
		
			
				
					|  |  |  |             else | 
			
		
	
	
		
			
				
					|  |  | 
 |