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
0a420fd3
Commit
0a420fd3
authored
Sep 11, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix TRACK::Copy() usage
parent
fe13569b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
block.cpp
pcbnew/block.cpp
+10
-6
No files found.
pcbnew/block.cpp
View file @
0a420fd3
...
@@ -390,7 +390,8 @@ static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool era
...
@@ -390,7 +390,8 @@ static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool era
int
Color
;
int
Color
;
BASE_SCREEN
*
screen
=
panel
->
GetScreen
();
BASE_SCREEN
*
screen
=
panel
->
GetScreen
();
Color
=
YELLOW
;
GRSetDrawMode
(
DC
,
g_XorMode
);
Color
=
YELLOW
;
GRSetDrawMode
(
DC
,
g_XorMode
);
/* Effacement ancien cadre */
/* Effacement ancien cadre */
if
(
erase
)
if
(
erase
)
...
@@ -1265,9 +1266,10 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC )
...
@@ -1265,9 +1266,10 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC )
{
{
next_track
=
track
->
Next
();
next_track
=
track
->
Next
();
if
(
IsSegmentInBox
(
GetScreen
()
->
BlockLocate
,
track
)
)
if
(
IsSegmentInBox
(
GetScreen
()
->
BlockLocate
,
track
)
)
{
/* la piste est ici bonne a etre deplacee */
{
/* la piste est ici bonne a etre deplacee */
m_Pcb
->
m_Status_Pcb
=
0
;
m_Pcb
->
m_Status_Pcb
=
0
;
new_track
=
track
->
Copy
(
1
);
new_track
=
track
->
Copy
();
new_track
->
Insert
(
m_Pcb
,
NULL
);
new_track
->
Insert
(
m_Pcb
,
NULL
);
new_track
->
m_Start
.
x
+=
deltaX
;
new_track
->
m_Start
.
y
+=
deltaY
;
new_track
->
m_Start
.
x
+=
deltaX
;
new_track
->
m_Start
.
y
+=
deltaY
;
new_track
->
m_End
.
x
+=
deltaX
;
new_track
->
m_End
.
y
+=
deltaY
;
new_track
->
m_End
.
x
+=
deltaX
;
new_track
->
m_End
.
y
+=
deltaY
;
...
@@ -1291,7 +1293,7 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC )
...
@@ -1291,7 +1293,7 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC )
{
{
/* la piste est ici bonne a etre deplacee */
/* la piste est ici bonne a etre deplacee */
new_track
=
new
TRACK
(
m_Pcb
);
new_track
=
new
TRACK
(
m_Pcb
);
new_track
=
track
->
Copy
(
1
);
new_track
=
track
->
Copy
();
new_track
->
Insert
(
m_Pcb
,
NULL
);
new_track
->
Insert
(
m_Pcb
,
NULL
);
new_track
->
m_Start
.
x
+=
deltaX
;
new_track
->
m_Start
.
y
+=
deltaY
;
new_track
->
m_Start
.
x
+=
deltaX
;
new_track
->
m_Start
.
y
+=
deltaY
;
new_track
->
m_End
.
x
+=
deltaX
;
new_track
->
m_End
.
y
+=
deltaY
;
new_track
->
m_End
.
x
+=
deltaX
;
new_track
->
m_End
.
y
+=
deltaY
;
...
@@ -1315,15 +1317,17 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC )
...
@@ -1315,15 +1317,17 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC )
{
{
case
TYPEDRAWSEGMENT
:
case
TYPEDRAWSEGMENT
:
{
{
#undef STRUCT
#undef STRUCT
#define STRUCT ( (DRAWSEGMENT*) PtStruct )
#define STRUCT ( (DRAWSEGMENT*) PtStruct )
if
(
(
g_TabOneLayerMask
[
STRUCT
->
GetLayer
()]
&
masque_layer
)
==
0
)
if
(
(
g_TabOneLayerMask
[
STRUCT
->
GetLayer
()]
&
masque_layer
)
==
0
)
break
;
break
;
if
(
IsStructInBox
(
GetScreen
()
->
BlockLocate
,
PtStruct
)
==
NULL
)
if
(
IsStructInBox
(
GetScreen
()
->
BlockLocate
,
PtStruct
)
==
NULL
)
break
;
break
;
/* l'element est ici bon a etre copie */
/* l'element est ici bon a etre copie */
DRAWSEGMENT
*
new_drawsegment
=
new
DRAWSEGMENT
(
m_Pcb
);
DRAWSEGMENT
*
new_drawsegment
=
new
DRAWSEGMENT
(
m_Pcb
);
new_drawsegment
->
Copy
(
STRUCT
);
new_drawsegment
->
Copy
(
STRUCT
);
new_drawsegment
->
Pnext
=
m_Pcb
->
m_Drawings
;
new_drawsegment
->
Pnext
=
m_Pcb
->
m_Drawings
;
new_drawsegment
->
Pback
=
m_Pcb
;
new_drawsegment
->
Pback
=
m_Pcb
;
m_Pcb
->
m_Drawings
->
Pback
=
new_drawsegment
;
m_Pcb
->
m_Drawings
->
Pback
=
new_drawsegment
;
...
...
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