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
5cb57e3b
Commit
5cb57e3b
authored
Feb 29, 2008
by
CHARRAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gen Bom List now works in unicode build version
parent
e2abaa81
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
change_log.txt
change_log.txt
+2
-0
dialog_build_BOM.cpp
eeschema/dialog_build_BOM.cpp
+12
-14
No files found.
change_log.txt
View file @
5cb57e3b
...
@@ -10,6 +10,8 @@ email address.
...
@@ -10,6 +10,8 @@ email address.
+eeschema
+eeschema
Renaming the sheet filename now works in simple and complex hierarchies.
Renaming the sheet filename now works in simple and complex hierarchies.
Use carefully because this can change the whole schematic structure.
Use carefully because this can change the whole schematic structure.
Gen Bom List now works in unicode build version
(label list generation crashed eeschema in unicode build version)
+all
+all
Display filename and full sheet name ("sheet path") in sheet reference
Display filename and full sheet name ("sheet path") in sheet reference
...
...
eeschema/dialog_build_BOM.cpp
View file @
5cb57e3b
...
@@ -728,9 +728,8 @@ void WinEDA_Build_BOM_Frame::GenereListeOfItems( const wxString& FullFileName )
...
@@ -728,9 +728,8 @@ void WinEDA_Build_BOM_Frame::GenereListeOfItems( const wxString& FullFileName )
NbItems
=
GenListeCmp
(
NULL
);
NbItems
=
GenListeCmp
(
NULL
);
if
(
NbItems
)
if
(
NbItems
)
{
{
List
=
(
ListComponent
*
)
List
=
(
ListComponent
*
)
MyZMalloc
(
NbItems
*
sizeof
(
ListComponent
)
);
MyZMalloc
(
NbItems
*
sizeof
(
ListComponent
)
);
if
(
List
==
NULL
)
// Error memory alloc
if
(
List
==
NULL
)
{
{
fclose
(
f
);
fclose
(
f
);
return
;
return
;
...
@@ -784,12 +783,10 @@ void WinEDA_Build_BOM_Frame::GenereListeOfItems( const wxString& FullFileName )
...
@@ -784,12 +783,10 @@ void WinEDA_Build_BOM_Frame::GenereListeOfItems( const wxString& FullFileName )
/***************************************/
/***************************************/
/* Generation liste des Labels globaux */
/* Generation liste des Labels globaux */
/***************************************/
/***************************************/
NbItems
=
GenListeGLabels
(
NULL
);
NbItems
=
GenListeGLabels
(
NULL
);
if
(
NbItems
)
if
(
NbItems
)
{
{
ListOfLabels
=
(
ListLabel
*
)
MyZMalloc
(
NbItems
*
sizeof
(
ListLabel
)
);
ListOfLabels
=
(
ListLabel
*
)
MyZMalloc
(
NbItems
*
sizeof
(
ListLabel
)
);
memset
(
(
void
*
)
ListOfLabels
,
0
,
NbItems
*
sizeof
(
ListLabel
)
);
if
(
ListOfLabels
==
NULL
)
if
(
ListOfLabels
==
NULL
)
{
{
fclose
(
f
);
fclose
(
f
);
...
@@ -806,7 +803,7 @@ void WinEDA_Build_BOM_Frame::GenereListeOfItems( const wxString& FullFileName )
...
@@ -806,7 +803,7 @@ void WinEDA_Build_BOM_Frame::GenereListeOfItems( const wxString& FullFileName )
qsort
(
ListOfLabels
,
NbItems
,
sizeof
(
ListLabel
),
qsort
(
ListOfLabels
,
NbItems
,
sizeof
(
ListLabel
),
(
int
(
*
)
(
const
void
*
,
const
void
*
)
)
ListTriGLabelBySheet
);
(
int
(
*
)
(
const
void
*
,
const
void
*
)
)
ListTriGLabelBySheet
);
msg
.
Printf
(
_
(
"
\n
#Glob
label
s ( order = Sheet Number ) count = %d
\n
"
),
NbItems
);
msg
.
Printf
(
_
(
"
\n
#Glob
al, Hierarchical Labels and PinSheet
s ( order = Sheet Number ) count = %d
\n
"
),
NbItems
);
fprintf
(
f
,
"%s"
,
CONV_TO_UTF8
(
msg
)
);
fprintf
(
f
,
"%s"
,
CONV_TO_UTF8
(
msg
)
);
PrintListeGLabel
(
f
,
ListOfLabels
,
NbItems
);
PrintListeGLabel
(
f
,
ListOfLabels
,
NbItems
);
}
}
...
@@ -817,7 +814,7 @@ void WinEDA_Build_BOM_Frame::GenereListeOfItems( const wxString& FullFileName )
...
@@ -817,7 +814,7 @@ void WinEDA_Build_BOM_Frame::GenereListeOfItems( const wxString& FullFileName )
qsort
(
ListOfLabels
,
NbItems
,
sizeof
(
ListLabel
),
qsort
(
ListOfLabels
,
NbItems
,
sizeof
(
ListLabel
),
(
int
(
*
)
(
const
void
*
,
const
void
*
)
)
ListTriGLabelByVal
);
(
int
(
*
)
(
const
void
*
,
const
void
*
)
)
ListTriGLabelByVal
);
msg
.
Printf
(
_
(
"
\n
#Glob
label
s ( order = Alphab. ) count = %d
\n\n
"
),
NbItems
);
msg
.
Printf
(
_
(
"
\n
#Glob
al, Hierarchical Labels and PinSheet
s ( order = Alphab. ) count = %d
\n\n
"
),
NbItems
);
fprintf
(
f
,
"%s"
,
CONV_TO_UTF8
(
msg
)
);
fprintf
(
f
,
"%s"
,
CONV_TO_UTF8
(
msg
)
);
PrintListeGLabel
(
f
,
ListOfLabels
,
NbItems
);
PrintListeGLabel
(
f
,
ListOfLabels
,
NbItems
);
}
}
...
@@ -1383,8 +1380,8 @@ static int PrintListeGLabel( FILE* f, ListLabel* List, int NbItems )
...
@@ -1383,8 +1380,8 @@ static int PrintListeGLabel( FILE* f, ListLabel* List, int NbItems )
DrawLabelStruct
*
DrawTextItem
;
DrawLabelStruct
*
DrawTextItem
;
DrawSheetLabelStruct
*
DrawSheetLabel
;
DrawSheetLabelStruct
*
DrawSheetLabel
;
ListLabel
*
LabelItem
;
ListLabel
*
LabelItem
;
wxString
msg
;
wxString
msg
,
sheetpath
;
char
str
[
64
]
;
wxString
labeltype
;
for
(
ii
=
0
;
ii
<
NbItems
;
ii
++
)
for
(
ii
=
0
;
ii
<
NbItems
;
ii
++
)
{
{
...
@@ -1396,14 +1393,15 @@ static int PrintListeGLabel( FILE* f, ListLabel* List, int NbItems )
...
@@ -1396,14 +1393,15 @@ static int PrintListeGLabel( FILE* f, ListLabel* List, int NbItems )
case
DRAW_GLOBAL_LABEL_STRUCT_TYPE
:
case
DRAW_GLOBAL_LABEL_STRUCT_TYPE
:
DrawTextItem
=
(
DrawLabelStruct
*
)
(
LabelItem
->
m_Label
);
DrawTextItem
=
(
DrawLabelStruct
*
)
(
LabelItem
->
m_Label
);
if
(
LabelItem
->
m_LabelType
==
DRAW_HIER_LABEL_STRUCT_TYPE
)
if
(
LabelItem
->
m_LabelType
==
DRAW_HIER_LABEL_STRUCT_TYPE
)
strncpy
(
str
,
"Hierarchical"
,
sizeof
(
str
)
);
labeltype
=
wxT
(
"Hierarchical"
);
else
else
strncpy
(
str
,
"Global "
,
sizeof
(
str
)
);
labeltype
=
wxT
(
"Global "
);
sheetpath
=
CONV_FROM_UTF8
(
LabelItem
->
m_SheetPath
);
msg
.
Printf
(
msg
.
Printf
(
_
(
"> %-28.28s %s (Sheet %s) pos: %3.3f, %3.3f
\n
"
),
_
(
"> %-28.28s %s (Sheet %s) pos: %3.3f, %3.3f
\n
"
),
DrawTextItem
->
m_Text
.
GetData
(),
DrawTextItem
->
m_Text
.
GetData
(),
str
,
labeltype
.
GetData
()
,
LabelItem
->
m_SheetPath
,
sheetpath
.
GetData
()
,
(
float
)
DrawTextItem
->
m_Pos
.
x
/
1000
,
(
float
)
DrawTextItem
->
m_Pos
.
x
/
1000
,
(
float
)
DrawTextItem
->
m_Pos
.
y
/
1000
);
(
float
)
DrawTextItem
->
m_Pos
.
y
/
1000
);
...
@@ -1420,7 +1418,7 @@ static int PrintListeGLabel( FILE* f, ListLabel* List, int NbItems )
...
@@ -1420,7 +1418,7 @@ static int PrintListeGLabel( FILE* f, ListLabel* List, int NbItems )
jj
=
4
;
jj
=
4
;
wxString
labtype
=
CONV_FROM_UTF8
(
SheetLabelType
[
jj
]
);
wxString
labtype
=
CONV_FROM_UTF8
(
SheetLabelType
[
jj
]
);
msg
.
Printf
(
msg
.
Printf
(
_
(
"> %-28.28s Sheet %-7.7s (Sheet %s) pos: %3.3f, %3.3f
\n
"
),
_
(
"> %-28.28s
Pin
Sheet %-7.7s (Sheet %s) pos: %3.3f, %3.3f
\n
"
),
DrawSheetLabel
->
m_Text
.
GetData
(),
DrawSheetLabel
->
m_Text
.
GetData
(),
labtype
.
GetData
(),
labtype
.
GetData
(),
LabelItem
->
m_SheetPath
,
LabelItem
->
m_SheetPath
,
...
...
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