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
6f33e6da
Commit
6f33e6da
authored
Aug 16, 2011
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SetName() was broken
parent
e7eef8cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
dialog_edit_libentry_fields_in_lib.cpp
eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp
+1
-1
eeschema_config.cpp
eeschema/eeschema_config.cpp
+2
-0
lib_field.cpp
eeschema/lib_field.cpp
+5
-1
No files found.
eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp
View file @
6f33e6da
...
@@ -511,7 +511,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::InitBuffers()
...
@@ -511,7 +511,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::InitBuffers()
{
{
D
(
printf
(
"add template:%s
\n
"
,
TO_UTF8
(
it
->
m_Name
)
);
)
D
(
printf
(
"add template:%s
\n
"
,
TO_UTF8
(
it
->
m_Name
)
);
)
fld
.
SetName
(
it
->
m_Name
);
fld
.
SetName
(
it
->
m_Name
);
fld
.
m_Text
=
it
->
m_Value
;
// empty? ok too.
fld
.
m_Text
=
it
->
m_Value
;
// empty? ok too.
if
(
!
it
->
m_Visible
)
if
(
!
it
->
m_Visible
)
...
...
eeschema/eeschema_config.cpp
View file @
6f33e6da
...
@@ -710,6 +710,8 @@ void SCH_EDIT_FRAME::SaveSettings()
...
@@ -710,6 +710,8 @@ void SCH_EDIT_FRAME::SaveSettings()
m_TemplateFieldNames
.
Format
(
&
sf
,
0
);
m_TemplateFieldNames
.
Format
(
&
sf
,
0
);
D
(
printf
(
"saving formatted template fieldnames:'%s'
\n
"
,
sf
.
GetString
().
c_str
()
);)
wxString
record
=
FROM_UTF8
(
sf
.
GetString
().
c_str
()
);
wxString
record
=
FROM_UTF8
(
sf
.
GetString
().
c_str
()
);
record
.
Replace
(
wxT
(
"
\n
"
),
wxT
(
""
),
true
);
// strip all newlines
record
.
Replace
(
wxT
(
"
\n
"
),
wxT
(
""
),
true
);
// strip all newlines
record
.
Replace
(
wxT
(
" "
),
wxT
(
" "
),
true
);
// double space to single
record
.
Replace
(
wxT
(
" "
),
wxT
(
" "
),
true
);
// double space to single
...
...
eeschema/lib_field.cpp
View file @
6f33e6da
...
@@ -631,8 +631,12 @@ void LIB_FIELD::SetName( const wxString& aName )
...
@@ -631,8 +631,12 @@ void LIB_FIELD::SetName( const wxString& aName )
// Mandatory field names are fixed.
// Mandatory field names are fixed.
// So what? Why should the low level code be in charge of such a policy issue?
// So what? Why should the low level code be in charge of such a policy issue?
if
(
m_id
<
MANDATORY_FIELDS
)
// Besides, m_id is a relic that is untrustworthy now.
if
(
m_id
>=
0
&&
m_id
<
MANDATORY_FIELDS
)
{
D
(
printf
(
"trying to set a MANDATORY_FIELD's name
\n
"
);)
return
;
return
;
}
if
(
m_name
!=
aName
)
if
(
m_name
!=
aName
)
{
{
...
...
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