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
d2fe629b
Commit
d2fe629b
authored
Feb 23, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drc dialog fixes
parent
f406e9d9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
43 deletions
+66
-43
drc_stuff.h
pcbnew/drc_stuff.h
+66
-43
No files found.
pcbnew/drc_stuff.h
View file @
d2fe629b
...
...
@@ -66,7 +66,8 @@
* information held is the board coordinate and the MenuText for each item.
* Also held is the type of error by number and the location of the MARKER.
* A function is provided to translate that number into text.
* Some errors involve only one item (item with an incorrect param) so m_AsSecondItem is set to false in this case
* Some errors involve only one item (item with an incorrect param) so
* m_hasSecondItem is set to false in this case.
*/
class
DRC_ITEM
{
...
...
@@ -77,7 +78,7 @@ protected:
wxString
m_BText
;
///< text for the second BOARD_ITEM
wxPoint
m_APos
;
///< the location of the first (or main ) BOARD_ITEM
wxPoint
m_BPos
;
///< the location of the second BOARD_ITEM
bool
m_AsSecondItem
;
///< true when 2 items create a DRC error, false if only one item
bool
m_hasSecondItem
;
///< true when 2 items create a DRC error, false if only one item
public
:
...
...
@@ -110,7 +111,7 @@ public:
SetData
(
aErrorCode
,
aIssuePos
,
aText
,
aText
,
aPos
,
aPos
);
m_A
sSecondItem
=
false
;
m_ha
sSecondItem
=
false
;
}
void
SetData
(
int
aErrorCode
,
const
wxPoint
&
aIssuePos
,
...
...
@@ -123,10 +124,12 @@ public:
m_BText
=
bText
;
m_APos
=
aPos
;
m_BPos
=
bPos
;
m_A
sSecondItem
=
true
;
m_ha
sSecondItem
=
true
;
}
bool
AsSecondItem
(
void
)
const
{
return
m_AsSecondItem
;
}
bool
HasSecondItem
()
const
{
return
m_hasSecondItem
;
}
/**
* Function ShowHtml
* translates this object into a fragment of HTML suitable for the
...
...
@@ -137,6 +140,8 @@ public:
{
wxString
ret
;
if
(
m_hasSecondItem
)
{
// an html fragment for the entire message in the listbox. feel free
// to add color if you want:
ret
.
Printf
(
_
(
"ErrType(%d): <b>%s</b><ul><li> %s: %s </li><li> %s: %s </li></ul>"
),
...
...
@@ -144,6 +149,14 @@ public:
GetErrorText
().
GetData
(),
ShowCoord
(
m_APos
).
GetData
(),
m_AText
.
GetData
(),
ShowCoord
(
m_BPos
).
GetData
(),
m_BText
.
GetData
()
);
}
else
{
ret
.
Printf
(
_
(
"ErrType(%d): <b>%s</b><ul><li> %s: %s </li></ul>"
),
m_ErrorCode
,
GetErrorText
().
GetData
(),
ShowCoord
(
m_APos
).
GetData
(),
m_AText
.
GetData
()
);
}
return
ret
;
}
...
...
@@ -159,11 +172,21 @@ public:
{
wxString
ret
;
if
(
m_hasSecondItem
)
{
ret
.
Printf
(
wxT
(
"ErrType(%d): %s
\n
%s: %s
\n
%s: %s
\n
"
),
m_ErrorCode
,
GetErrorText
().
GetData
(),
ShowCoord
(
m_APos
).
GetData
(),
m_AText
.
GetData
(),
ShowCoord
(
m_BPos
).
GetData
(),
m_BText
.
GetData
()
);
}
else
{
ret
.
Printf
(
wxT
(
"ErrType(%d): %s
\n
%s: %s
\n
"
),
m_ErrorCode
,
GetErrorText
().
GetData
(),
ShowCoord
(
m_APos
).
GetData
(),
m_AText
.
GetData
()
);
}
return
ret
;
}
...
...
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