Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
da857f27
Commit
da857f27
authored
Jan 26, 2010
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added pads show/hide from layer manager (option was existing in dialog, but not in code)
parent
969933fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
6 deletions
+44
-6
TODO.txt
TODO.txt
+0
-5
class_pad_draw_functions.cpp
pcbnew/class_pad_draw_functions.cpp
+44
-1
No files found.
TODO.txt
View file @
da857f27
...
...
@@ -89,11 +89,6 @@ P2) Write accessors for all items in PCB_VISIBLE such as grid control, so that
* Need to add polygon aperture type.
Then example 2 in RS274xrevd_e.pdf will draw properly.
* Figure out why BOARD::IsElementVisible( PAD_{FR,BK}_VISIBLE ) is never tested,
and why the pads cannot be turned off. Did something get broke?
* Via visibility does not respond to the LAYER_WIDGET.
Dick:
D1) Get the nested quote support for DSNLEXER fixed up and committed.
...
...
pcbnew/class_pad_draw_functions.cpp
View file @
da857f27
...
...
@@ -38,6 +38,45 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode,
if
(
m_Flags
&
DO_NOT_DRAW
)
return
;
/* We can show/hide pads from the layer manager.
* options are show/hide pads on front and/or back side of the board
* For through pads, we hide them only if both sides are hidden.
* smd pads on back are hidden for all layers (copper and technical layers)
* on back side of the board
* smd pads on front are hidden for all layers (copper and technical layers)
* on front side of the board
* ECO, edge and Draw layers and not considered
*/
// Mask layers for Back side of board
#define BACK_SIDE_LAYERS \
(LAYER_BACK | ADHESIVE_LAYER_BACK | SOLDERPASTE_LAYER_BACK\
| SILKSCREEN_LAYER_BACK | SOLDERMASK_LAYER_BACK)
// Mask layers for Front side of board
#define FRONT_SIDE_LAYERS \
(LAYER_FRONT | ADHESIVE_LAYER_FRONT | SOLDERPASTE_LAYER_FRONT\
| SILKSCREEN_LAYER_FRONT | SOLDERMASK_LAYER_FRONT)
bool
frontVisible
=
g_DesignSettings
.
IsElementVisible
(
PCB_VISIBLE
(
PAD_FR_VISIBLE
)
);
bool
backVisible
=
g_DesignSettings
.
IsElementVisible
(
PCB_VISIBLE
(
PAD_BK_VISIBLE
)
);
if
(
!
frontVisible
&&
!
backVisible
)
return
;
/* If pad are only on front side (no layer on back side)
* and if hide front side pads is enabled, do not draw
*/
if
(
!
frontVisible
&&
(
(
m_Masque_Layer
&
BACK_SIDE_LAYERS
)
==
0
)
)
return
;
/* If pad are only on back side (no layer on front side)
* and if hide back side pads is enabled, do not draw
*/
if
(
!
backVisible
&&
(
(
m_Masque_Layer
&
FRONT_SIDE_LAYERS
)
==
0
)
)
return
;
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
();
PCB_SCREEN
*
screen
=
frame
->
GetScreen
();
if
(
frame
->
m_DisplayPadFill
==
FILLED
)
...
...
@@ -49,10 +88,14 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode,
#endif
if
(
m_Masque_Layer
&
LAYER_FRONT
)
color
=
g_PadCMPColor
;
{
color
=
g_PadCMPColor
;
}
if
(
m_Masque_Layer
&
LAYER_BACK
)
{
color
|=
g_PadCUColor
;
}
if
(
color
==
0
)
/* Not on copper layer */
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment