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
aff8c279
Commit
aff8c279
authored
Sep 02, 2014
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug #1364174 (Component Library Editor: Bug when decreasing "Number of Units")
parent
06f59a94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
dialog_edit_component_in_lib.cpp
eeschema/dialogs/dialog_edit_component_in_lib.cpp
+2
-3
libeditframe.cpp
eeschema/libeditframe.cpp
+6
-0
No files found.
eeschema/dialogs/dialog_edit_component_in_lib.cpp
View file @
aff8c279
...
...
@@ -182,7 +182,6 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::InitBasicPanel()
void
DIALOG_EDIT_COMPONENT_IN_LIBRARY
::
OnOkClick
(
wxCommandEvent
&
event
)
{
/* Update the doc, keyword and doc filename strings */
int
index
;
LIB_ALIAS
*
alias
;
LIB_PART
*
component
=
m_Parent
->
GetCurPart
();
...
...
@@ -206,8 +205,8 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnOkClick( wxCommandEvent& event )
component
->
SetAliases
(
m_PartAliasListCtrl
->
GetStrings
()
);
in
dex
=
m_SelNumberOfUnits
->
GetValue
();
ChangeNbUnitsPerPackage
(
index
);
in
t
unitCount
=
m_SelNumberOfUnits
->
GetValue
();
ChangeNbUnitsPerPackage
(
unitCount
);
if
(
m_AsConvertButt
->
GetValue
()
)
{
...
...
eeschema/libeditframe.cpp
View file @
aff8c279
...
...
@@ -419,6 +419,7 @@ void LIB_EDIT_FRAME::UpdatePartSelectList()
if
(
!
part
||
part
->
GetUnitCount
()
<=
1
)
{
m_unit
=
1
;
m_partSelectBox
->
Append
(
wxEmptyString
);
}
else
...
...
@@ -431,6 +432,11 @@ void LIB_EDIT_FRAME::UpdatePartSelectList()
}
}
// Ensure the current selected unit is compatible with
// the number of units of the current part:
if
(
part
&&
part
->
GetUnitCount
()
<
m_unit
)
m_unit
=
1
;
m_partSelectBox
->
SetSelection
(
(
m_unit
>
0
)
?
m_unit
-
1
:
0
);
}
...
...
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