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
7ce91d4e
Commit
7ce91d4e
authored
Dec 18, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed zone area removal (& undoing) using the EDIT_TOOL.
parent
fb784323
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
edit_tool.cpp
pcbnew/tools/edit_tool.cpp
+2
-15
No files found.
pcbnew/tools/edit_tool.cpp
View file @
7ce91d4e
...
...
@@ -303,16 +303,7 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem )
{
MODULE
*
module
=
static_cast
<
MODULE
*>
(
aItem
);
module
->
ClearFlags
();
for
(
D_PAD
*
pad
=
module
->
Pads
().
GetFirst
();
pad
;
pad
=
pad
->
Next
()
)
getView
()
->
Remove
(
pad
);
for
(
BOARD_ITEM
*
drawing
=
module
->
GraphicalItems
().
GetFirst
();
drawing
;
drawing
=
drawing
->
Next
()
)
getView
()
->
Remove
(
drawing
);
getView
()
->
Remove
(
&
module
->
Reference
()
);
getView
()
->
Remove
(
&
module
->
Value
()
);
module
->
RunOnChildren
(
std
::
bind1st
(
std
::
mem_fun
(
&
KIGFX
::
VIEW
::
Remove
),
getView
()
)
);
// Module itself is deleted after the switch scope is finished
// list of pads is rebuild by BOARD::BuildListOfNets()
...
...
@@ -322,11 +313,6 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem )
}
break
;
case
PCB_ZONE_AREA_T
:
getView
()
->
Remove
(
aItem
);
getModel
<
BOARD
>
(
PCB_T
)
->
Delete
(
aItem
);
return
;
// These are not supposed to be removed
case
PCB_PAD_T
:
case
PCB_MODULE_TEXT_T
:
...
...
@@ -341,6 +327,7 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem )
case
PCB_TARGET_T
:
// a target (graphic item)
case
PCB_MARKER_T
:
// a marker used to show something
case
PCB_ZONE_T
:
// SEG_ZONE items are now deprecated
case
PCB_ZONE_AREA_T
:
break
;
default
:
// other types do not need to (or should not) be handled
...
...
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