kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #36253
[PATCH] GAL: Draw hole even if pad has no layer
From d82e05f3328c95cb4443af7a2c0040ff1766fc96 Mon Sep 17 00:00:00 2001
From: Andrzej Wolski <awolski.kicad@xxxxxxxxx>
Date: Fri, 22 Jun 2018 12:07:56 +0200
Subject: [PATCH] GAL: Draw hole even if pad has no layer
While pcbnew does not allow to create THT pad without a copper layer,
there are boards that somehow have such pads. In that case, pad holes
(both PTH and NPTH) were not drawn in GAL.
---
pcbnew/class_pad.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp
index c4a48c8e8..5bc6acc80 100644
--- a/pcbnew/class_pad.cpp
+++ b/pcbnew/class_pad.cpp
@@ -1316,7 +1316,8 @@ unsigned int D_PAD::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
return HIDE;
// Only draw the pad if at least one of the layers it crosses is being displayed
- if( board && !( board->GetVisibleLayers() & GetLayerSet() ).any() )
+ // (or if pad has no layer)
+ if( board && !( board->GetVisibleLayers() & GetLayerSet() ).any() && GetLayerSet().any() )
return HIDE;
// Netnames will be shown only if zoom is appropriate
--
2.16.2
Follow ups