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
0a3fdeed
Commit
0a3fdeed
authored
Nov 21, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lorenzo's fix plus tidying
parent
4c2b9e21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
32 deletions
+33
-32
classes_body_items.h
eeschema/classes_body_items.h
+5
-0
symbedit.cpp
eeschema/symbedit.cpp
+28
-32
No files found.
eeschema/classes_body_items.h
View file @
0a3fdeed
...
...
@@ -450,6 +450,11 @@ public:
wxString
m_Name
;
/* Field Name */
public
:
LibDrawField
*
Next
()
{
return
(
LibDrawField
*
)
Pnext
;
}
LibDrawField
*
Prev
()
{
return
(
LibDrawField
*
)
Pback
;
}
LibDrawField
(
int
idfield
=
2
);
~
LibDrawField
();
virtual
wxString
GetClass
()
const
...
...
eeschema/symbedit.cpp
View file @
0a3fdeed
...
...
@@ -114,7 +114,7 @@ void WinEDA_LibeditFrame::LoadOneSymbol( wxDC* DC )
}
SuppressDuplicateDrawItem
(
CurrentLibEntry
);
GetScreen
()
->
SetModify
();
GetScreen
()
->
SetModify
();
// Move (and place ) the new draw items:
HandleBlockBegin
(
DC
,
-
1
,
GetScreen
()
->
m_Curseur
);
...
...
@@ -380,22 +380,24 @@ static bool CompareSymbols( LibEDA_BaseStruct* DEntryRef,
void
WinEDA_LibeditFrame
::
PlaceAncre
()
{
int
ii
,
*
ptsegm
;
int
dx
,
dy
;
/* Offsets de deplacement */
EDA_LibComponentStruct
*
LibEntry
;
LibEDA_BaseStruct
*
DrawEntry
;
dx
=
-
(
GetScreen
()
->
m_Curseur
.
x
);
dy
=
GetScreen
()
->
m_Curseur
.
y
;
LibEDA_BaseStruct
*
DrawEntry
;
LibEntry
=
CurrentLibEntry
;
if
(
LibEntry
==
NULL
)
return
;
GetScreen
()
->
SetModify
();
wxSize
offset
(
-
GetScreen
()
->
m_Curseur
.
x
,
GetScreen
()
->
m_Curseur
.
y
);
GetScreen
()
->
SetModify
();
LibEntry
->
m_Name
.
m_Pos
.
x
+=
dx
;
LibEntry
->
m_Name
.
m_Pos
.
y
+=
dy
;
LibEntry
->
m_Prefix
.
m_Pos
.
x
+=
dx
;
LibEntry
->
m_Prefix
.
m_Pos
.
y
+=
dy
;
LibEntry
->
m_Name
.
m_Pos
+=
offset
;
LibEntry
->
m_Prefix
.
m_Pos
+=
offset
;
for
(
LibDrawField
*
field
=
LibEntry
->
Fields
;
field
;
field
=
field
->
Next
()
)
{
field
->
m_Pos
+=
offset
;
}
DrawEntry
=
LibEntry
->
m_Drawings
;
while
(
DrawEntry
)
...
...
@@ -405,52 +407,46 @@ void WinEDA_LibeditFrame::PlaceAncre()
case
COMPONENT_ARC_DRAW_TYPE
:
#undef STRUCT
#define STRUCT ( (LibDrawArc*) DrawEntry )
STRUCT
->
m_Pos
.
x
+=
dx
;
STRUCT
->
m_Pos
.
y
+=
dy
;
STRUCT
->
m_ArcStart
.
x
+=
dx
;
STRUCT
->
m_ArcStart
.
y
+=
dy
;
STRUCT
->
m_ArcEnd
.
x
+=
dx
;
STRUCT
->
m_ArcEnd
.
y
+=
dy
;
STRUCT
->
m_Pos
+=
offset
;
STRUCT
->
m_ArcStart
+=
offset
;
STRUCT
->
m_ArcEnd
+=
offset
;
break
;
case
COMPONENT_CIRCLE_DRAW_TYPE
:
#undef STRUCT
#define STRUCT ( (LibDrawCircle*) DrawEntry )
STRUCT
->
m_Pos
.
x
+=
dx
;
STRUCT
->
m_Pos
.
y
+=
dy
;
STRUCT
->
m_Pos
+=
offset
;
break
;
case
COMPONENT_GRAPHIC_TEXT_DRAW_TYPE
:
#undef STRUCT
#define STRUCT ( (LibDrawText*) DrawEntry )
STRUCT
->
m_Pos
.
x
+=
dx
;
STRUCT
->
m_Pos
.
y
+=
dy
;
STRUCT
->
m_Pos
+=
offset
;
break
;
case
COMPONENT_RECT_DRAW_TYPE
:
#undef STRUCT
#define STRUCT ( (LibDrawSquare*) DrawEntry )
STRUCT
->
m_Pos
.
x
+=
dx
;
STRUCT
->
m_Pos
.
y
+=
dy
;
STRUCT
->
m_End
.
x
+=
dx
;
STRUCT
->
m_End
.
y
+=
dy
;
STRUCT
->
m_Pos
+=
offset
;
STRUCT
->
m_End
+=
offset
;
break
;
case
COMPONENT_PIN_DRAW_TYPE
:
#undef STRUCT
#define STRUCT ( (LibDrawPin*) DrawEntry )
STRUCT
->
m_Pos
.
x
+=
dx
;
STRUCT
->
m_Pos
.
y
+=
dy
;
STRUCT
->
m_Pos
+=
offset
;
break
;
case
COMPONENT_POLYLINE_DRAW_TYPE
:
#undef STRUCT
#define STRUCT ( (LibDrawPolyline*) DrawEntry )
ptsegm
=
STRUCT
->
m_PolyList
;
for
(
ii
=
STRUCT
->
m_CornersCount
;
ii
>
0
;
ii
--
)
int
ii
;
int
*
ptsegm
;
for
(
ptsegm
=
STRUCT
->
m_PolyList
,
ii
=
STRUCT
->
m_CornersCount
;
ii
>
0
;
ii
--
)
{
*
ptsegm
+=
dx
;
ptsegm
++
;
*
ptsegm
+=
dy
;
ptsegm
++
;
*
ptsegm
++
+=
offset
.
x
;
*
ptsegm
++
+=
offset
.
y
;
}
break
;
...
...
@@ -461,7 +457,7 @@ void WinEDA_LibeditFrame::PlaceAncre()
}
/* Redraw the symbol */
GetScreen
()
->
m_Curseur
.
x
=
GetScreen
()
->
m_Curseur
.
y
=
0
;
GetScreen
()
->
m_Curseur
.
x
=
GetScreen
()
->
m_Curseur
.
y
=
0
;
Recadre_Trace
(
TRUE
);
GetScreen
()
->
SetRefreshReq
();
GetScreen
()
->
SetRefreshReq
();
}
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