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
4ebe4714
Commit
4ebe4714
authored
May 10, 2015
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes in add zone and duplicate zone (legacy mode)
parent
e2c7e6bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
zones_by_polygon.cpp
pcbnew/zones_by_polygon.cpp
+12
-1
zones_functions_for_undo_redo.cpp
pcbnew/zones_functions_for_undo_redo.cpp
+7
-3
No files found.
pcbnew/zones_by_polygon.cpp
View file @
4ebe4714
...
...
@@ -123,6 +123,16 @@ void PCB_EDIT_FRAME::duplicateZone( wxDC* aDC, ZONE_CONTAINER* aZone )
else
success
=
InvokeNonCopperZonesEditor
(
this
,
aZone
,
&
zoneSettings
);
// If the new zone is on the same layer as the the initial zone,
// do nothing
if
(
success
&&
(
aZone
->
GetLayer
()
==
zoneSettings
.
m_CurrentZone_Layer
)
)
{
DisplayError
(
this
,
_
(
"The duplicated zone is on the same layer as the initial zone, which has no sense.
\n
"
"Please, chose an other layer for the new zone"
)
);
success
=
false
;
}
if
(
success
)
{
zoneSettings
.
ExportSetting
(
*
newZone
);
...
...
@@ -148,7 +158,8 @@ void PCB_EDIT_FRAME::duplicateZone( wxDC* aDC, ZONE_CONTAINER* aZone )
if
(
GetBoard
()
->
GetAreaIndex
(
newZone
)
>=
0
&&
GetBoard
()
->
Test_Drc_Areas_Outlines_To_Areas_Outlines
(
newZone
,
true
)
)
{
DisplayError
(
this
,
_
(
"Duplicate Zone: The outline of the duplicated zone fails DRC check!"
)
);
DisplayError
(
this
,
_
(
"The outline of the duplicated zone fails DRC check!"
)
);
}
UpdateCopyOfZonesList
(
s_PickedList
,
s_AuxiliaryList
,
GetBoard
()
);
...
...
pcbnew/zones_functions_for_undo_redo.cpp
View file @
4ebe4714
...
...
@@ -257,9 +257,13 @@ void UpdateCopyOfZonesList( PICKED_ITEMS_LIST& aPickList,
}
}
wxASSERT_MSG
(
notfound
!=
true
,
wxT
(
"UpdateCopyOfZonesList() error: item not found in "
"aAuxiliaryList"
)
);
if
(
notfound
)
// happens when the new zone overlaps an existing zone
// and these zones are combined
{
DBG
(
printf
(
"UpdateCopyOfZonesList(): item not found in aAuxiliaryList,"
"combined with an other zone
\n
"
)
);
}
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