Fix coding policy violations missed in previous commit.
This commit is contained in:
parent
4aa28d82a7
commit
a398d45914
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue