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
b8b0fc6e
Commit
b8b0fc6e
authored
Jan 24, 2008
by
CHARRAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugs about fill zones and block delete removed
parent
4195d71f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
class_zone.cpp
pcbnew/class_zone.cpp
+1
-0
onleftclick.cpp
pcbnew/onleftclick.cpp
+2
-2
zones_by_polygon.cpp
pcbnew/zones_by_polygon.cpp
+9
-3
No files found.
pcbnew/class_zone.cpp
View file @
b8b0fc6e
...
...
@@ -285,6 +285,7 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& off
* @param draw_mode = draw mode: OR, XOR ..
*/
{
if
(
DC
==
NULL
)
return
;
int
curr_layer
=
(
(
PCB_SCREEN
*
)
panel
->
GetScreen
()
)
->
m_Active_Layer
;
int
color
=
g_DesignSettings
.
m_LayerColor
[
m_Layer
];
...
...
pcbnew/onleftclick.cpp
View file @
b8b0fc6e
...
...
@@ -220,13 +220,13 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
case
ID_PCB_ZONES_BUTT
:
if
(
(
DrawStruct
==
NULL
)
||
(
DrawStruct
->
m_Flags
==
0
)
)
{
SetCurItem
(
DrawStruct
=
Begin_Zone
(
DC
)
);
GetScreen
()
->
SetCurItem
(
DrawStruct
=
Begin_Zone
(
DC
)
);
}
else
if
(
DrawStruct
&&
(
DrawStruct
->
Type
()
==
TYPEEDGEZONE
)
&&
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
{
SetCurItem
(
DrawStruct
=
Begin_Zone
(
DC
)
);
GetScreen
()
->
SetCurItem
(
DrawStruct
=
Begin_Zone
(
DC
)
);
}
else
DisplayError
(
this
,
wxT
(
"Edit: zone internal error"
)
);
...
...
pcbnew/zones_by_polygon.cpp
View file @
b8b0fc6e
...
...
@@ -357,6 +357,7 @@ void WinEDA_PcbFrame::Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER * zone_contai
if
(
zone_container
->
m_Poly
->
GetNumCorners
()
<=
3
)
{
zone_container
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
GR_XOR
);
Delete_Zone_Fill
(
DC
,
NULL
,
zone_container
->
m_TimeStamp
);
m_Pcb
->
Delete
(
zone_container
);
return
;
...
...
@@ -373,7 +374,7 @@ void WinEDA_PcbFrame::Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER * zone_contai
m_Pcb
->
RedrawAreasOutlines
(
DrawPanel
,
DC
,
GR_OR
,
layer
);
int
ii
=
m_Pcb
->
GetAreaIndex
(
zone_container
);
// test if zone_container exists
if
(
ii
<
0
)
zone_container
=
NULL
;
//
was removed by
combining zones
if
(
ii
<
0
)
zone_container
=
NULL
;
//
zone_container does not exist anymaore, after
combining zones
int
error_count
=
m_Pcb
->
Test_Drc_Areas_Outlines_To_Areas_Outlines
(
zone_container
,
true
);
if
(
error_count
)
{
...
...
@@ -536,13 +537,17 @@ EDGE_ZONE* WinEDA_PcbFrame::Begin_Zone( wxDC* DC )
if
(
Drc_On
&&
m_drc
->
Drc
(
newedge
)
==
BAD_DRC
)
{
delete
newedge
;
SetCurItem
(
NULL
);
// use the form of SetCurItem() which does not write to the msg panel,
// SCREEN::SetCurItem(), so the DRC error remains on screen.
// WinEDA_PcbFrame::SetCurItem() calls Display_Infos().
GetScreen
()
->
SetCurItem
(
NULL
);
DisplayError
(
this
,
_
(
"DRC error: this start point is inside or too close an other area"
));
return
NULL
;
}
// link into list:
newedge
->
Pnext
=
oldedge
;
SetCurItem
(
newedge
);
if
(
oldedge
)
oldedge
->
Pback
=
newedge
;
...
...
@@ -575,6 +580,7 @@ EDGE_ZONE* WinEDA_PcbFrame::Begin_Zone( wxDC* DC )
newedge
->
Pnext
=
oldedge
;
oldedge
->
Pback
=
newedge
;
m_Pcb
->
m_CurrentLimitZone
=
newedge
;
SetCurItem
(
newedge
);
}
}
...
...
@@ -697,7 +703,7 @@ bool WinEDA_PcbFrame::End_Zone( wxDC* DC )
DelLimitesZone
(
DC
,
TRUE
);
new_zone_container
->
m_Flags
=
0
;
SetCurItem
(
NULL
);
// This outine can be deleted when merging outlines
GetScreen
()
->
SetCurItem
(
NULL
);
// This outine can be deleted when merging outlines
// Combine zones if possible :
m_Pcb
->
AreaPolygonModified
(
new_zone_container
,
true
,
verbose
);
...
...
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