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
03a17a28
Commit
03a17a28
authored
Aug 04, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: modules are not selectable in the high contrast mode (GAL).
parent
3f8c0910
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
class_module.cpp
pcbnew/class_module.cpp
+16
-1
pcb_draw_panel_gal.cpp
pcbnew/pcb_draw_panel_gal.cpp
+2
-0
selection_tool.cpp
pcbnew/tools/selection_tool.cpp
+3
-3
No files found.
pcbnew/class_module.cpp
View file @
03a17a28
...
...
@@ -832,8 +832,23 @@ void MODULE::ViewUpdate( int aUpdateFlags )
void
MODULE
::
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
{
aCount
=
1
;
aCount
=
2
;
aLayers
[
0
]
=
ITEM_GAL_LAYER
(
ANCHOR_VISIBLE
);
switch
(
m_Layer
)
{
case
F_Cu
:
aLayers
[
1
]
=
ITEM_GAL_LAYER
(
MOD_FR_VISIBLE
);
break
;
case
B_Cu
:
aLayers
[
1
]
=
ITEM_GAL_LAYER
(
MOD_BK_VISIBLE
);
break
;
default
:
assert
(
false
);
// do you really have modules placed on inner layers?
break
;
}
}
...
...
pcbnew/pcb_draw_panel_gal.cpp
View file @
03a17a28
...
...
@@ -269,11 +269,13 @@ void PCB_DRAW_PANEL_GAL::SetHighContrastLayer( LAYER_ID aLayer )
if
(
aLayer
==
B_Cu
)
{
rSettings
->
SetActiveLayer
(
ITEM_GAL_LAYER
(
PAD_BK_VISIBLE
)
);
rSettings
->
SetActiveLayer
(
ITEM_GAL_LAYER
(
MOD_BK_VISIBLE
)
);
rSettings
->
SetActiveLayer
(
NETNAMES_GAL_LAYER
(
PAD_BK_NETNAMES_VISIBLE
)
);
}
else
if
(
aLayer
==
F_Cu
)
{
rSettings
->
SetActiveLayer
(
ITEM_GAL_LAYER
(
PAD_FR_VISIBLE
)
);
rSettings
->
SetActiveLayer
(
ITEM_GAL_LAYER
(
MOD_FR_VISIBLE
)
);
rSettings
->
SetActiveLayer
(
NETNAMES_GAL_LAYER
(
PAD_FR_NETNAMES_VISIBLE
)
);
}
}
...
...
pcbnew/tools/selection_tool.cpp
View file @
03a17a28
...
...
@@ -588,13 +588,13 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const
int
layers
[
KIGFX
::
VIEW
::
VIEW_MAX_LAYERS
],
layers_count
;
// Filter out items that do not belong to active layers
std
::
set
<
unsigned
int
>
activeLayers
=
getView
()
->
GetPainter
()
->
GetSettings
()
->
GetActiveLayers
();
const
std
::
set
<
unsigned
int
>&
activeLayers
=
getView
()
->
GetPainter
()
->
GetSettings
()
->
GetActiveLayers
();
aItem
->
ViewGetLayers
(
layers
,
layers_count
);
for
(
int
i
=
0
;
i
<
layers_count
;
++
i
)
{
if
(
activeLayers
.
count
(
layers
[
i
]
)
>
0
)
// Item is on at least one of
active layers
if
(
activeLayers
.
count
(
layers
[
i
]
)
>
0
)
// Item is on at least one of the
active layers
{
onActive
=
true
;
break
;
...
...
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