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
db5d90ce
Commit
db5d90ce
authored
Mar 25, 2013
by
Wayne Stambaugh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix SCH_FIELD get reference designator text bug. (fixes lp:1159401)
parent
2b929702
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
sch_field.cpp
eeschema/sch_field.cpp
+4
-4
sch_field.h
eeschema/sch_field.h
+5
-4
No files found.
eeschema/sch_field.cpp
View file @
db5d90ce
...
@@ -90,7 +90,7 @@ EDA_ITEM* SCH_FIELD::Clone() const
...
@@ -90,7 +90,7 @@ EDA_ITEM* SCH_FIELD::Clone() const
}
}
const
wxString
SCH_FIELD
::
GetText
()
const
const
wxString
SCH_FIELD
::
Get
FullyQualified
Text
()
const
{
{
wxString
text
=
m_Text
;
wxString
text
=
m_Text
;
...
@@ -194,7 +194,7 @@ void SCH_FIELD::Draw( EDA_DRAW_PANEL* panel, wxDC* DC,
...
@@ -194,7 +194,7 @@ void SCH_FIELD::Draw( EDA_DRAW_PANEL* panel, wxDC* DC,
color
=
ReturnLayerColor
(
LAYER_FIELDS
);
color
=
ReturnLayerColor
(
LAYER_FIELDS
);
}
}
DrawGraphicText
(
panel
,
DC
,
textpos
,
color
,
GetText
(),
orient
,
m_Size
,
DrawGraphicText
(
panel
,
DC
,
textpos
,
color
,
Get
FullyQualified
Text
(),
orient
,
m_Size
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_CENTER
,
GR_TEXT_HJUSTIFY_CENTER
,
GR_TEXT_VJUSTIFY_CENTER
,
LineWidth
,
m_Italic
,
m_Bold
);
LineWidth
,
m_Italic
,
m_Bold
);
...
@@ -387,7 +387,7 @@ void SCH_FIELD::Place( SCH_EDIT_FRAME* frame, wxDC* DC )
...
@@ -387,7 +387,7 @@ void SCH_FIELD::Place( SCH_EDIT_FRAME* frame, wxDC* DC )
bool
SCH_FIELD
::
Matches
(
wxFindReplaceData
&
aSearchData
,
void
*
aAuxData
,
wxPoint
*
aFindLocation
)
bool
SCH_FIELD
::
Matches
(
wxFindReplaceData
&
aSearchData
,
void
*
aAuxData
,
wxPoint
*
aFindLocation
)
{
{
bool
match
;
bool
match
;
wxString
text
=
GetText
();
wxString
text
=
Get
FullyQualified
Text
();
if
(
((
m_id
>
VALUE
)
&&
!
(
aSearchData
.
GetFlags
()
&
FR_SEARCH_ALL_FIELDS
))
if
(
((
m_id
>
VALUE
)
&&
!
(
aSearchData
.
GetFlags
()
&
FR_SEARCH_ALL_FIELDS
))
||
((
m_id
==
REFERENCE
)
&&
!
(
aSearchData
.
GetFlags
()
&
FR_REPLACE_REFERENCES
))
)
||
((
m_id
==
REFERENCE
)
&&
!
(
aSearchData
.
GetFlags
()
&
FR_REPLACE_REFERENCES
))
)
...
@@ -427,7 +427,7 @@ bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint
...
@@ -427,7 +427,7 @@ bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint
bool
SCH_FIELD
::
Replace
(
wxFindReplaceData
&
aSearchData
,
void
*
aAuxData
)
bool
SCH_FIELD
::
Replace
(
wxFindReplaceData
&
aSearchData
,
void
*
aAuxData
)
{
{
bool
isReplaced
;
bool
isReplaced
;
wxString
text
=
GetText
();
wxString
text
=
Get
FullyQualified
Text
();
if
(
m_id
==
REFERENCE
&&
aAuxData
!=
NULL
)
if
(
m_id
==
REFERENCE
&&
aAuxData
!=
NULL
)
{
{
...
...
eeschema/sch_field.h
View file @
db5d90ce
...
@@ -89,13 +89,14 @@ public:
...
@@ -89,13 +89,14 @@ public:
void
SetId
(
int
aId
)
{
m_id
=
aId
;
}
void
SetId
(
int
aId
)
{
m_id
=
aId
;
}
/**
/**
* Function GetText
* Function GetFullyQualifiedText
* overrides the default implementation to allow for the part suffix to be added
* returns the fully qualified field text by allowing for the part suffix to be added
* to the reference designator field if the component has multiple parts.
* to the reference designator field if the component has multiple parts. For all other
* fields this is the equivalent of EDA_TEXT::GetText().
*
*
* @return a const wxString object containing the field's string.
* @return a const wxString object containing the field's string.
*/
*/
const
wxString
GetText
()
const
;
const
wxString
Get
FullyQualified
Text
()
const
;
void
Place
(
SCH_EDIT_FRAME
*
frame
,
wxDC
*
DC
);
void
Place
(
SCH_EDIT_FRAME
*
frame
,
wxDC
*
DC
);
...
...
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