From 96794e94e3fd233481f162fbebb3f18798afbf86 Mon Sep 17 00:00:00 2001
From: Seth Hillbrand <seth@kipro-pcb.com>
Date: Wed, 12 Mar 2025 11:45:37 -0700
Subject: [PATCH] Correct layerset calls

The Board layerset (because BOARD is a BOARD_ITEM) should return the
layers that the board contains instead of just the F.Cu.  This assigns
the common function to map to the board-specific functions

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20317
---
 pcbnew/board.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pcbnew/board.h b/pcbnew/board.h
index 5235ce0a09..2ca3ef930d 100644
--- a/pcbnew/board.h
+++ b/pcbnew/board.h
@@ -609,6 +609,7 @@ public:
      * @return the enabled layers in bit-mapped form.
      */
     LSET GetEnabledLayers() const;
+    LSET GetLayerSet() const override { return GetEnabledLayers(); }
 
     /**
      * A proxy function that calls the correspondent function in m_BoardSettings.
@@ -616,6 +617,7 @@ public:
      * @param aLayerMask the new bit-mask of enabled layers.
      */
     void SetEnabledLayers( LSET aLayerMask );
+    void SetLayerSet( const LSET& aLayerMask ) override { SetEnabledLayers( aLayerMask ); }
 
     /**
      * A proxy function that calls the correspondent function in m_BoardSettings