From e9c51f1d12d952a64a7ebd6fc7871e0035e3536b Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Fri, 11 Aug 2023 00:01:39 -0400 Subject: [PATCH] Preserve logic that assumes footprint shapes can't have nets --- pcbnew/pcb_shape.cpp | 7 +++++++ pcbnew/pcb_shape.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/pcbnew/pcb_shape.cpp b/pcbnew/pcb_shape.cpp index 47f82f7826..fa0dea34e0 100644 --- a/pcbnew/pcb_shape.cpp +++ b/pcbnew/pcb_shape.cpp @@ -86,6 +86,13 @@ bool PCB_SHAPE::IsType( const std::vector& aScanTypes ) const } +bool PCB_SHAPE::IsConnected() const +{ + // Only board-level copper shapes are connectable + return IsOnCopperLayer() && !GetParentFootprint(); +} + + void PCB_SHAPE::SetLayer( PCB_LAYER_ID aLayer ) { BOARD_ITEM::SetLayer( aLayer ); diff --git a/pcbnew/pcb_shape.h b/pcbnew/pcb_shape.h index 28b9c52fad..4bc79524b9 100644 --- a/pcbnew/pcb_shape.h +++ b/pcbnew/pcb_shape.h @@ -57,6 +57,8 @@ public: return wxT( "PCB_SHAPE" ); } + bool IsConnected() const override; + wxString GetFriendlyName() const override { return EDA_SHAPE::GetFriendlyName(); } bool IsType( const std::vector& aScanTypes ) const override;