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
79472a68
Commit
79472a68
authored
Jan 02, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eeschema: minor changes in field edition
parent
598cc337
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
dialog_edit_component_in_schematic.cpp
eeschema/dialog_edit_component_in_schematic.cpp
+11
-2
dialog_edit_libentry_fields_in_lib.cpp
eeschema/dialog_edit_libentry_fields_in_lib.cpp
+5
-6
No files found.
eeschema/dialog_edit_component_in_schematic.cpp
View file @
79472a68
#include <wx/checklst.h>
#include <wx/checklst.h>
#include <wx/tooltip.h>
#include <wx/tooltip.h>
#include <algorithm>
#include "fctsys.h"
#include "fctsys.h"
#include "gr_basic.h"
#include "gr_basic.h"
...
@@ -155,7 +156,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions()
...
@@ -155,7 +156,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions()
}
}
}
}
// For components with multiple sha
m
es (De Morgan representation) Set the selected shape:
// For components with multiple sha
p
es (De Morgan representation) Set the selected shape:
if
(
convertCheckBox
->
IsEnabled
()
)
if
(
convertCheckBox
->
IsEnabled
()
)
{
{
m_Cmp
->
m_Convert
=
convertCheckBox
->
GetValue
()
?
2
:
1
;
m_Cmp
->
m_Convert
=
convertCheckBox
->
GetValue
()
?
2
:
1
;
...
@@ -488,6 +489,9 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel()
...
@@ -488,6 +489,9 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel()
// if fieldNdx == REFERENCE, VALUE, FOOTPRINT, or DATASHEET, then disable editing
// if fieldNdx == REFERENCE, VALUE, FOOTPRINT, or DATASHEET, then disable editing
fieldNameTextCtrl
->
Enable
(
fieldNdx
>=
FIELD1
);
fieldNameTextCtrl
->
Enable
(
fieldNdx
>=
FIELD1
);
fieldNameTextCtrl
->
SetEditable
(
fieldNdx
>=
FIELD1
);
fieldNameTextCtrl
->
SetEditable
(
fieldNdx
>=
FIELD1
);
moveUpButton
->
Enable
(
fieldNdx
>=
FIELD1
);
// disable move up button for non moveable fields
// if fieldNdx == REFERENCE, VALUE, then disable delete button
deleteFieldButton
->
Enable
(
fieldNdx
>
VALUE
);
fieldValueTextCtrl
->
SetValue
(
field
.
m_Text
);
fieldValueTextCtrl
->
SetValue
(
field
.
m_Text
);
...
@@ -549,7 +553,12 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField()
...
@@ -549,7 +553,12 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField()
field
.
m_Name
=
fieldNameTextCtrl
->
GetValue
();
field
.
m_Name
=
fieldNameTextCtrl
->
GetValue
();
field
.
m_Text
=
fieldValueTextCtrl
->
GetValue
();
/* Void fields texts for REFERENCE and VALUE (value is the name of the compinent in lib ! ) are not allowed
* change them only for a new non void value
* When woid, usually netlists are broken
*/
if
(
!
fieldValueTextCtrl
->
GetValue
().
IsEmpty
()
||
fieldNdx
>
VALUE
)
field
.
m_Text
=
fieldValueTextCtrl
->
GetValue
();
setRowItem
(
fieldNdx
,
field
);
// update fieldListCtrl
setRowItem
(
fieldNdx
,
field
);
// update fieldListCtrl
...
...
eeschema/dialog_edit_libentry_fields_in_lib.cpp
View file @
79472a68
...
@@ -530,7 +530,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel()
...
@@ -530,7 +530,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel()
// if fieldNdx == REFERENCE, VALUE, FOOTPRINT, or DATASHEET, then disable filed name editing
// if fieldNdx == REFERENCE, VALUE, FOOTPRINT, or DATASHEET, then disable filed name editing
fieldNameTextCtrl
->
Enable
(
fieldNdx
>=
FIELD1
);
fieldNameTextCtrl
->
Enable
(
fieldNdx
>=
FIELD1
);
fieldNameTextCtrl
->
SetEditable
(
fieldNdx
>=
FIELD1
);
fieldNameTextCtrl
->
SetEditable
(
fieldNdx
>=
FIELD1
);
moveUpButton
->
Enable
(
fieldNdx
>=
FIELD1
);
// disable move up button for non moveable fields
moveUpButton
->
Enable
(
fieldNdx
>=
FIELD1
);
// disable move up button for non moveable fields
// if fieldNdx == REFERENCE, VALUE, then disable delete button
// if fieldNdx == REFERENCE, VALUE, then disable delete button
deleteFieldButton
->
Enable
(
fieldNdx
>
VALUE
);
deleteFieldButton
->
Enable
(
fieldNdx
>
VALUE
);
...
@@ -614,14 +614,13 @@ bool DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copyPanelToSelectedField()
...
@@ -614,14 +614,13 @@ bool DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copyPanelToSelectedField()
rotateCheckBox
->
SetValue
(
field
.
m_Orient
==
TEXT_ORIENT_VERT
);
rotateCheckBox
->
SetValue
(
field
.
m_Orient
==
TEXT_ORIENT_VERT
);
/* Void fields
for REFERENCE and VALUE
are not allowed
/* Void fields
texts for REFERENCE and VALUE (value is the name of the compinent in lib ! )
are not allowed
* change the
r
m only for a new non void value
* change them only for a new non void value
*/
*/
if
(
!
fieldValueTextCtrl
->
GetValue
().
IsEmpty
()
)
if
(
!
fieldValueTextCtrl
->
GetValue
().
IsEmpty
()
||
fieldNdx
>
VALUE
)
field
.
m_Text
=
fieldValueTextCtrl
->
GetValue
();
field
.
m_Text
=
fieldValueTextCtrl
->
GetValue
();
if
(
!
fieldNameTextCtrl
->
GetValue
().
IsEmpty
()
)
field
.
m_Name
=
fieldNameTextCtrl
->
GetValue
();
field
.
m_Name
=
fieldNameTextCtrl
->
GetValue
();
setRowItem
(
fieldNdx
,
field
);
// update fieldListCtrl
setRowItem
(
fieldNdx
,
field
);
// update fieldListCtrl
...
...
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