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
fb784323
Commit
fb784323
authored
Dec 18, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made pads & module texts unselectable
parent
f4de2877
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
20 deletions
+5
-20
selection_tool.cpp
pcbnew/tools/selection_tool.cpp
+5
-20
No files found.
pcbnew/tools/selection_tool.cpp
View file @
fb784323
...
@@ -220,13 +220,10 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere )
...
@@ -220,13 +220,10 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere )
break
;
break
;
default
:
default
:
// Remove modules, they have to be selected by clicking on area that does not
// Remove unselectable items
// contain anything but module footprint and not selectable items
for
(
int
i
=
collector
.
GetCount
()
-
1
;
i
>=
0
;
--
i
)
for
(
int
i
=
collector
.
GetCount
()
-
1
;
i
>=
0
;
--
i
)
{
{
BOARD_ITEM
*
boardItem
=
collector
[
i
];
if
(
!
selectable
(
collector
[
i
]
)
)
if
(
boardItem
->
Type
()
==
PCB_MODULE_T
||
!
selectable
(
boardItem
)
)
collector
.
Remove
(
i
);
collector
.
Remove
(
i
);
}
}
...
@@ -455,12 +452,6 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const
...
@@ -455,12 +452,6 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const
}
}
break
;
break
;
case
PCB_PAD_T
:
// Pads are not selectable in multiple selection mode
if
(
m_multiple
)
return
false
;
/* no break */
case
PCB_MODULE_T
:
case
PCB_MODULE_T
:
if
(
aItem
->
IsOnLayer
(
LAYER_N_FRONT
)
&&
board
->
IsElementVisible
(
MOD_FR_VISIBLE
)
)
if
(
aItem
->
IsOnLayer
(
LAYER_N_FRONT
)
&&
board
->
IsElementVisible
(
MOD_FR_VISIBLE
)
)
return
true
;
return
true
;
...
@@ -472,16 +463,10 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const
...
@@ -472,16 +463,10 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const
break
;
break
;
case
PCB_MODULE_TEXT_T
:
// These are not selectable
// Module texts are not selectable in multiple selection mode
if
(
m_multiple
)
return
false
;
break
;
// These are not selectable, otherwise silkscreen drawings would be easily destroyed
case
PCB_MODULE_EDGE_T
:
case
PCB_MODULE_EDGE_T
:
// and some other stuff that should not be selected
case
PCB_MODULE_TEXT_T
:
case
PCB_PAD_T
:
case
NOT_USED
:
case
NOT_USED
:
case
TYPE_NOT_INIT
:
case
TYPE_NOT_INIT
:
return
false
;
return
false
;
...
...
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