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
1f087b2f
Commit
1f087b2f
authored
Mar 30, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Libedit: fix crashes when no active libary selected (happens when creating a new component)
parent
67f70fe0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
dialog_edit_component_in_lib.cpp
eeschema/dialogs/dialog_edit_component_in_lib.cpp
+10
-2
libfield.cpp
eeschema/libfield.cpp
+3
-4
No files found.
eeschema/dialogs/dialog_edit_component_in_lib.cpp
View file @
1f087b2f
...
...
@@ -304,8 +304,16 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddAliasOfPart( wxCommandEvent& event )
if
(
aliasname
.
IsEmpty
()
)
return
;
if
(
m_PartAliasListCtrl
->
FindString
(
aliasname
)
!=
wxNOT_FOUND
||
library
->
FindEntry
(
aliasname
)
!=
NULL
)
if
(
m_PartAliasListCtrl
->
FindString
(
aliasname
)
!=
wxNOT_FOUND
)
{
wxString
msg
;
msg
.
Printf
(
_
(
"Alias or component name <%s> already in use."
),
GetChars
(
aliasname
)
);
DisplayError
(
this
,
msg
);
return
;
}
if
(
library
&&
library
->
FindEntry
(
aliasname
)
!=
NULL
)
{
wxString
msg
;
msg
.
Printf
(
_
(
"Alias or component name <%s> already exists in library <%s>."
),
...
...
eeschema/libfield.cpp
View file @
1f087b2f
...
...
@@ -69,7 +69,7 @@ void LIB_EDIT_FRAME::EditField( wxDC* DC, LIB_FIELD* aField )
wxString
msg
;
// Test the current library for name conflicts.
if
(
m_library
->
FindEntry
(
text
)
!=
NULL
)
if
(
m_library
&&
m_library
->
FindEntry
(
text
)
!=
NULL
)
{
msg
.
Printf
(
_
(
"The name <%s> conflicts with an existing entry in the component \
library <%s>.
\n\n
Do you wish to replace the current component in library with this one?"
),
...
...
@@ -88,8 +88,7 @@ library <%s>.\n\nDo you wish to replace the current component in library with th
{
msg
.
Printf
(
_
(
"The current component already has an alias named <%s>.
\n\n
Do you \
wish to remove this alias from the component?"
),
GetChars
(
text
),
GetChars
(
m_library
->
GetName
()
)
);
GetChars
(
text
)
);
int
rsp
=
wxMessageBox
(
msg
,
_
(
"Confirm"
),
wxYES_NO
|
wxICON_QUESTION
,
this
);
...
...
@@ -102,7 +101,7 @@ wish to remove this alias from the component?" ),
parent
->
SetName
(
text
);
// Test the library for any conflicts with the any aliases in the current component.
if
(
parent
->
GetAliasCount
()
>
1
&&
m_library
->
Conflicts
(
parent
)
)
if
(
parent
->
GetAliasCount
()
>
1
&&
m_library
&&
m_library
->
Conflicts
(
parent
)
)
{
msg
.
Printf
(
_
(
"The new component contains alias names that conflict with entries \
in the component library <%s>.
\n\n
Do you wish to remove all of the conflicting aliases from \
...
...
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