mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 18:23:15 +02:00
AllCuMask() and AllTechMask() are static, they do NOT modify "this".
This commit is contained in:
parent
a94d8a7e78
commit
0d083d0230
@ -106,15 +106,15 @@ wxString BOARD_ITEM::GetLayerName() const
|
|||||||
wxString BOARD_ITEM::layerMaskDescribe() const
|
wxString BOARD_ITEM::layerMaskDescribe() const
|
||||||
{
|
{
|
||||||
const BOARD* board = GetBoard();
|
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.
|
// 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" );
|
return _( "all copper layers" );
|
||||||
|
|
||||||
LSET copperLayers = layers & board->GetEnabledLayers().AllCuMask();
|
|
||||||
LSET techLayers = layers & board->GetEnabledLayers().AllTechMask();
|
|
||||||
|
|
||||||
for( LSET testLayers : { copperLayers, techLayers, layers } )
|
for( LSET testLayers : { copperLayers, techLayers, layers } )
|
||||||
{
|
{
|
||||||
for( int bit = PCBNEW_LAYER_ID_START; bit < PCB_LAYER_ID_COUNT; ++bit )
|
for( int bit = PCBNEW_LAYER_ID_START; bit < PCB_LAYER_ID_COUNT; ++bit )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user