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
b808fcf4
Commit
b808fcf4
authored
Dec 17, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed libedit crash when adding parts in a component
parent
1fb89fb8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2069 additions
and
2043 deletions
+2069
-2043
class_libentry.cpp
eeschema/class_libentry.cpp
+13
-6
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+2056
-2037
No files found.
eeschema/class_libentry.cpp
View file @
b808fcf4
...
@@ -608,6 +608,10 @@ bool LIB_COMPONENT::Load( FILE* aFile, char* aLine, int* aLineNum,
...
@@ -608,6 +608,10 @@ bool LIB_COMPONENT::Load( FILE* aFile, char* aLine, int* aLineNum,
return
false
;
return
false
;
}
}
// Ensure unitCount is >= 1 (could be read as 0 in old libraries)
if
(
unitCount
<
1
)
unitCount
=
1
;
m_DrawPinNum
=
(
drawnum
==
'N'
)
?
FALSE
:
true
;
m_DrawPinNum
=
(
drawnum
==
'N'
)
?
FALSE
:
true
;
m_DrawPinName
=
(
drawname
==
'N'
)
?
FALSE
:
true
;
m_DrawPinName
=
(
drawname
==
'N'
)
?
FALSE
:
true
;
...
@@ -1202,13 +1206,12 @@ LIB_DRAW_ITEM* LIB_COMPONENT::LocateDrawItem( int aUnit, int aConvert, KICAD_T a
...
@@ -1202,13 +1206,12 @@ LIB_DRAW_ITEM* LIB_COMPONENT::LocateDrawItem( int aUnit, int aConvert, KICAD_T a
void
LIB_COMPONENT
::
SetPartCount
(
int
aCount
)
void
LIB_COMPONENT
::
SetPartCount
(
int
aCount
)
{
{
LIB_DRAW_ITEM_LIST
::
iterator
i
;
if
(
unitCount
==
aCount
)
if
(
unitCount
==
aCount
)
return
;
return
;
if
(
aCount
<
unitCount
)
if
(
aCount
<
unitCount
)
{
{
LIB_DRAW_ITEM_LIST
::
iterator
i
;
i
=
drawings
.
begin
();
i
=
drawings
.
begin
();
while
(
i
!=
drawings
.
end
()
)
while
(
i
!=
drawings
.
end
()
)
...
@@ -1223,14 +1226,18 @@ void LIB_COMPONENT::SetPartCount( int aCount )
...
@@ -1223,14 +1226,18 @@ void LIB_COMPONENT::SetPartCount( int aCount )
{
{
int
prevCount
=
unitCount
;
int
prevCount
=
unitCount
;
for
(
i
=
drawings
.
begin
();
i
!=
drawings
.
end
();
i
++
)
// We cannot use an iterator here, because when adding items in vector
// the buffer can be reallocated, that change the previous value of
// .begin() and .end() iterators and invalidate others iterators
unsigned
imax
=
drawings
.
size
();
for
(
unsigned
ii
=
0
;
ii
<
imax
;
ii
++
)
{
{
if
(
i
->
m_Unit
!=
1
)
if
(
drawings
[
ii
].
m_Unit
!=
1
)
continue
;
continue
;
for
(
int
j
=
prevCount
+
1
;
j
<=
aCount
;
j
++
)
for
(
int
j
=
prevCount
+
1
;
j
<=
aCount
;
j
++
)
{
{
LIB_DRAW_ITEM
*
newItem
=
i
->
GenCopy
();
LIB_DRAW_ITEM
*
newItem
=
drawings
[
ii
].
GenCopy
();
newItem
->
m_Unit
=
j
;
newItem
->
m_Unit
=
j
;
drawings
.
push_back
(
newItem
);
drawings
.
push_back
(
newItem
);
}
}
...
@@ -1267,7 +1274,7 @@ void LIB_COMPONENT::SetConversion( bool aSetConvert )
...
@@ -1267,7 +1274,7 @@ void LIB_COMPONENT::SetConversion( bool aSetConvert )
}
}
else
else
{
{
// Delete converted shape items bec
ua
se the converted shape does
// Delete converted shape items bec
au
se the converted shape does
// not exist
// not exist
LIB_DRAW_ITEM_LIST
::
iterator
i
=
drawings
.
begin
();
LIB_DRAW_ITEM_LIST
::
iterator
i
=
drawings
.
begin
();
...
...
internat/fr/kicad.mo
View file @
b808fcf4
No preview for this file type
internat/fr/kicad.po
View file @
b808fcf4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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