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
c1f11a1b
Commit
c1f11a1b
authored
Jul 23, 2014
by
Andrew Zonenberg
Committed by
Dick Hollenbeck
Jul 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Draw VIAs only if a layer they penetrate is visible.
parent
bde2a0a1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
class_pcb_layer_widget.cpp
pcbnew/class_pcb_layer_widget.cpp
+1
-0
class_track.cpp
pcbnew/class_track.cpp
+8
-9
pcb_painter.cpp
pcbnew/pcb_painter.cpp
+5
-0
No files found.
pcbnew/class_pcb_layer_widget.cpp
View file @
c1f11a1b
...
@@ -413,6 +413,7 @@ void PCB_LAYER_WIDGET::OnLayerVisible( int aLayer, bool isVisible, bool isFinal
...
@@ -413,6 +413,7 @@ void PCB_LAYER_WIDGET::OnLayerVisible( int aLayer, bool isVisible, bool isFinal
{
{
KIGFX
::
VIEW
*
view
=
galCanvas
->
GetView
();
KIGFX
::
VIEW
*
view
=
galCanvas
->
GetView
();
view
->
SetLayerVisible
(
aLayer
,
isVisible
);
view
->
SetLayerVisible
(
aLayer
,
isVisible
);
view
->
RecacheAllItems
(
true
);
}
}
if
(
isFinal
)
if
(
isFinal
)
...
...
pcbnew/class_track.cpp
View file @
c1f11a1b
...
@@ -393,17 +393,12 @@ LSET VIA::GetLayerSet() const
...
@@ -393,17 +393,12 @@ LSET VIA::GetLayerSet() const
// VIA_BLIND_BURIED or VIA_MICRVIA:
// VIA_BLIND_BURIED or VIA_MICRVIA:
LAYER_ID
bottom_layer
,
top_layer
;
// LayerPair() knows how layers are stored
LayerPair
(
&
top_layer
,
&
bottom_layer
);
LSET
layermask
;
LSET
layermask
;
wxASSERT
(
top_layer
<=
bottom_l
ayer
);
wxASSERT
(
m_Layer
<=
m_BottomL
ayer
);
// LAYER_IDs are numbered from front to back, this is top to bottom.
// LAYER_IDs are numbered from front to back, this is top to bottom.
for
(
LAYER_NUM
id
=
top_layer
;
id
<=
bottom_l
ayer
;
++
id
)
for
(
LAYER_NUM
id
=
m_Layer
;
id
<=
m_BottomL
ayer
;
++
id
)
{
{
layermask
.
set
(
id
);
layermask
.
set
(
id
);
}
}
...
@@ -780,13 +775,17 @@ void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
...
@@ -780,13 +775,17 @@ void VIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
GRSetDrawMode
(
aDC
,
aDrawMode
);
GRSetDrawMode
(
aDC
,
aDrawMode
);
BOARD
*
brd
=
GetBoard
(
);
BOARD
*
brd
=
GetBoard
();
EDA_COLOR_T
color
=
brd
->
GetVisibleElementColor
(
VIAS_VISIBLE
+
GetViaType
()
);
EDA_COLOR_T
color
=
brd
->
GetVisibleElementColor
(
VIAS_VISIBLE
+
GetViaType
()
);
if
(
brd
->
IsElementVisible
(
PCB_VISIBLE
(
VIAS_VISIBLE
+
GetViaType
())
)
==
false
if
(
brd
->
IsElementVisible
(
PCB_VISIBLE
(
VIAS_VISIBLE
+
GetViaType
())
)
==
false
&&
(
color
&
HIGHLIGHT_FLAG
)
!=
HIGHLIGHT_FLAG
)
&&
(
color
&
HIGHLIGHT_FLAG
)
!=
HIGHLIGHT_FLAG
)
return
;
return
;
// Only draw the via if at least one of the layers it crosses is being displayed
if
(
!
(
brd
->
GetVisibleLayers
()
&
GetLayerSet
()
).
any
()
)
return
;
if
(
DisplayOpt
.
ContrastModeDisplay
)
if
(
DisplayOpt
.
ContrastModeDisplay
)
{
{
if
(
!
IsOnLayer
(
curr_layer
)
)
if
(
!
IsOnLayer
(
curr_layer
)
)
...
...
pcbnew/pcb_painter.cpp
View file @
c1f11a1b
...
@@ -336,6 +336,11 @@ void PCB_PAINTER::draw( const VIA* aVia, int aLayer )
...
@@ -336,6 +336,11 @@ void PCB_PAINTER::draw( const VIA* aVia, int aLayer )
VECTOR2D
center
(
aVia
->
GetStart
()
);
VECTOR2D
center
(
aVia
->
GetStart
()
);
double
radius
;
double
radius
;
// Only draw the via if at least one of the layers it crosses is being displayed
BOARD
*
brd
=
aVia
->
GetBoard
(
);
if
(
!
(
brd
->
GetVisibleLayers
()
&
aVia
->
GetLayerSet
()
).
any
()
)
return
;
// Choose drawing settings depending on if we are drawing via's pad or hole
// Choose drawing settings depending on if we are drawing via's pad or hole
if
(
aLayer
==
ITEM_GAL_LAYER
(
VIA_THROUGH_VISIBLE
)
)
if
(
aLayer
==
ITEM_GAL_LAYER
(
VIA_THROUGH_VISIBLE
)
)
{
{
...
...
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