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
a398d459
Commit
a398d459
authored
Oct 08, 2014
by
Wayne Stambaugh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix coding policy violations missed in previous commit.
parent
4aa28d82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
dialog_erc.cpp
eeschema/dialogs/dialog_erc.cpp
+16
-12
No files found.
eeschema/dialogs/dialog_erc.cpp
View file @
a398d459
...
...
@@ -99,6 +99,7 @@ void DIALOG_ERC::Init()
m_buttonERC
->
SetDefault
();
}
void
DIALOG_ERC
::
updateMarkerCounts
(
SCH_SCREENS
*
screens
)
{
int
markers
=
screens
->
GetMarkerCount
();
...
...
@@ -115,6 +116,7 @@ void DIALOG_ERC::updateMarkerCounts( SCH_SCREENS *screens )
m_LastWarningCount
->
SetValue
(
num
);
}
/* Delete the old ERC markers, over the whole hierarchy
*/
void
DIALOG_ERC
::
OnEraseDrcMarkersClick
(
wxCommandEvent
&
event
)
...
...
@@ -161,6 +163,7 @@ void DIALOG_ERC::OnErcCmpClick( wxCommandEvent& event )
m_MessagesList
->
AppendText
(
messageList
[
ii
]
);
}
void
DIALOG_ERC
::
OnLeftClickMarkersList
(
wxCommandEvent
&
event
)
{
m_lastMarkerFound
=
NULL
;
...
...
@@ -180,6 +183,7 @@ void DIALOG_ERC::OnLeftClickMarkersList( wxCommandEvent& event )
for
(
sheet
=
SheetList
.
GetFirst
();
sheet
;
sheet
=
SheetList
.
GetNext
()
)
{
SCH_ITEM
*
item
=
(
SCH_ITEM
*
)
sheet
->
LastDrawList
();
for
(
;
item
;
item
=
item
->
Next
()
)
{
if
(
item
==
marker
)
...
...
@@ -223,7 +227,7 @@ void DIALOG_ERC::OnLeftDblClickMarkersList( wxCommandEvent& event )
if
(
m_lastMarkerFound
)
{
m_parent
->
SetCrossHairPosition
(
m_lastMarkerFound
->
m_Pos
);
m_parent
->
RedrawScreen
(
m_lastMarkerFound
->
m_Pos
,
true
);
m_parent
->
RedrawScreen
(
m_lastMarkerFound
->
m_Pos
,
true
);
// prevent a mouse left button release event in
// coming from the ERC dialog double click
// ( the button is released after closing this dialog and will generate
...
...
@@ -238,8 +242,7 @@ void DIALOG_ERC::OnLeftDblClickMarkersList( wxCommandEvent& event )
void
DIALOG_ERC
::
ReBuildMatrixPanel
()
{
// Try to know the size of bitmap button used in drc matrix
wxBitmapButton
*
dummy
=
new
wxBitmapButton
(
m_matrixPanel
,
wxID_ANY
,
KiBitmap
(
ercerr_xpm
)
);
wxBitmapButton
*
dummy
=
new
wxBitmapButton
(
m_matrixPanel
,
wxID_ANY
,
KiBitmap
(
ercerr_xpm
)
);
wxSize
bitmap_size
=
dummy
->
GetSize
();
delete
dummy
;
...
...
@@ -320,24 +323,24 @@ void DIALOG_ERC::setDRCMatrixButtonState( wxBitmapButton *aButton, int aState )
{
case
OK
:
bitmap_butt
=
erc_green_xpm
;
tooltip
=
_
(
"No error or warning"
);
tooltip
=
_
(
"No error or warning"
);
break
;
case
WAR
:
bitmap_butt
=
ercwarn_xpm
;
tooltip
=
_
(
"Generate warning"
);
tooltip
=
_
(
"Generate warning"
);
break
;
case
ERR
:
bitmap_butt
=
ercerr_xpm
;
tooltip
=
_
(
"Generate error"
);
tooltip
=
_
(
"Generate error"
);
break
;
}
if
(
bitmap_butt
)
{
aButton
->
SetBitmap
(
KiBitmap
(
bitmap_butt
)
);
aButton
->
SetToolTip
(
tooltip
);
aButton
->
SetBitmap
(
KiBitmap
(
bitmap_butt
)
);
aButton
->
SetToolTip
(
tooltip
);
}
}
...
...
@@ -348,6 +351,7 @@ void DIALOG_ERC::DisplayERC_MarkersList()
m_MarkersList
->
ClearList
();
SCH_SHEET_PATH
*
sheet
=
sheetList
.
GetFirst
();
for
(
;
sheet
!=
NULL
;
sheet
=
sheetList
.
GetNext
()
)
{
SCH_ITEM
*
item
=
sheet
->
LastDrawList
();
...
...
@@ -373,7 +377,7 @@ void DIALOG_ERC::DisplayERC_MarkersList()
void
DIALOG_ERC
::
ResetDefaultERCDiag
(
wxCommandEvent
&
event
)
{
memcpy
(
DiagErc
,
DefaultDiagErc
,
sizeof
(
DiagErc
)
);
memcpy
(
DiagErc
,
DefaultDiagErc
,
sizeof
(
DiagErc
)
);
ReBuildMatrixPanel
();
}
...
...
@@ -420,7 +424,7 @@ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
if
(
!
DiagErcTableInit
)
{
memcpy
(
DiagErc
,
DefaultDiagErc
,
sizeof
(
DefaultDiagErc
)
);
memcpy
(
DiagErc
,
DefaultDiagErc
,
sizeof
(
DefaultDiagErc
)
);
DiagErcTableInit
=
true
;
}
...
...
@@ -528,7 +532,7 @@ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
}
// Displays global results:
updateMarkerCounts
(
&
screens
);
updateMarkerCounts
(
&
screens
);
// Display diags:
DisplayERC_MarkersList
();
...
...
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