AllCuMask() and AllTechMask() are static, they do NOT modify "this".

This commit is contained in:
Jeff Young 2023-02-03 13:19:27 +00:00
parent a94d8a7e78
commit 0d083d0230
1 changed files with 5 additions and 5 deletions

View File

@ -106,15 +106,15 @@ wxString BOARD_ITEM::GetLayerName() const
wxString BOARD_ITEM::layerMaskDescribe() const
{
const BOARD* board = GetBoard();
LSET layers = GetLayerSet();
LSET layers = GetLayerSet() & board->GetEnabledLayers();
LSET copperLayers = layers & LSET::AllCuMask();
LSET techLayers = layers & LSET::AllTechMask();
// Try to be smart and useful. Check all copper first.
if( layers[F_Cu] && layers[B_Cu] )
if( (int) copperLayers.count() == board->GetCopperLayerCount() )
return _( "all copper layers" );
LSET copperLayers = layers & board->GetEnabledLayers().AllCuMask();
LSET techLayers = layers & board->GetEnabledLayers().AllTechMask();
for( LSET testLayers : { copperLayers, techLayers, layers } )
{
for( int bit = PCBNEW_LAYER_ID_START; bit < PCB_LAYER_ID_COUNT; ++bit )