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
e7817f3e
Commit
e7817f3e
authored
Jun 04, 2012
by
Marco Mattila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add zone duplication to pcbnew.
parent
e936d3c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
edit.cpp
pcbnew/edit.cpp
+18
-0
onrightclick.cpp
pcbnew/onrightclick.cpp
+3
-0
pcbnew_id.h
pcbnew/pcbnew_id.h
+1
-0
No files found.
pcbnew/edit.cpp
View file @
e7817f3e
...
...
@@ -467,6 +467,24 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
SetCurItem
(
NULL
);
// Outlines can have changed
break
;
case
ID_POPUP_PCB_ZONE_DUPLICATE
:
{
ZONE_CONTAINER
*
zone
=
(
ZONE_CONTAINER
*
)
GetCurItem
();
ZONE_CONTAINER
*
newZone
=
new
ZONE_CONTAINER
(
m_Pcb
);
newZone
->
Copy
(
zone
);
ZONE_SETTINGS
zoneSettings
;
zoneSettings
<<
*
zone
;
if
(
InvokeCopperZonesEditor
(
this
,
&
zoneSettings
)
)
{
zoneSettings
.
ExportSetting
(
*
newZone
);
m_Pcb
->
Add
(
newZone
);
newZone
->
Draw
(
m_canvas
,
&
dc
,
GR_OR
);
}
else
delete
newZone
;
}
break
;
case
ID_POPUP_PCB_ZONE_ADD_SIMILAR_ZONE
:
m_canvas
->
MoveCursorToCrossHair
();
m_canvas
->
SetAutoPanRequest
(
true
);
...
...
pcbnew/onrightclick.cpp
View file @
e7817f3e
...
...
@@ -621,6 +621,9 @@ void PCB_EDIT_FRAME::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu*
}
zones_menu
->
AppendSeparator
();
AddMenuItem
(
zones_menu
,
ID_POPUP_PCB_ZONE_DUPLICATE
,
_
(
"Duplicate Zone"
),
KiBitmap
(
add_zone_xpm
)
);
AddMenuItem
(
zones_menu
,
ID_POPUP_PCB_ZONE_ADD_SIMILAR_ZONE
,
_
(
"Add Similar Zone"
),
KiBitmap
(
add_zone_xpm
)
);
...
...
pcbnew/pcbnew_id.h
View file @
e7817f3e
...
...
@@ -92,6 +92,7 @@ enum pcbnew_ids
ID_POPUP_PCB_FILL_ALL_ZONES
,
ID_POPUP_PCB_FILL_ZONE
,
ID_POPUP_PCB_DELETE_ZONE_CONTAINER
,
ID_POPUP_PCB_ZONE_DUPLICATE
,
ID_POPUP_PCB_ZONE_ADD_SIMILAR_ZONE
,
ID_POPUP_PCB_ZONE_ADD_CUTOUT_ZONE
,
ID_POPUP_PCB_DELETE_ZONE_CUTOUT
,
...
...
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