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
24a1b05d
Commit
24a1b05d
authored
Sep 11, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix TRACK::Copy() usage
parent
38f9963e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
block.cpp
gerbview/block.cpp
+23
-8
No files found.
gerbview/block.cpp
View file @
24a1b05d
...
...
@@ -390,12 +390,18 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC )
{
next_track
=
track
->
Next
();
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
;
new_track
=
track
->
Copy
(
1
);
new_track
=
track
->
Copy
();
new_track
->
Insert
(
m_Pcb
,
NULL
);
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_Start
.
x
+=
deltaX
;
new_track
->
m_Start
.
y
+=
deltaY
;
new_track
->
m_End
.
x
+=
deltaX
;
new_track
->
m_End
.
y
+=
deltaY
;
new_track
->
Draw
(
DrawPanel
,
DC
,
GR_OR
);
// reaffichage
}
track
=
next_track
;
...
...
@@ -407,12 +413,21 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC )
{
next_track
=
track
->
Next
();
if
(
IsSegmentInBox
(
GetScreen
()
->
BlockLocate
,
track
)
)
{
/* la piste est ici bonne a etre deplacee */
{
/* la piste est ici bonne a etre deplacee */
// @todo: bug? memory leak at this point:
new_track
=
new
TRACK
(
m_Pcb
);
new_track
=
track
->
Copy
(
1
);
new_track
=
track
->
Copy
();
new_track
->
Insert
(
m_Pcb
,
NULL
);
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_Start
.
x
+=
deltaX
;
new_track
->
m_Start
.
y
+=
deltaY
;
new_track
->
m_End
.
x
+=
deltaX
;
new_track
->
m_End
.
y
+=
deltaY
;
new_track
->
Draw
(
DrawPanel
,
DC
,
GR_OR
);
// reaffichage
}
track
=
next_track
;
...
...
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