KiCad PCB EDA Suite
dialog_erc.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 2012 Wayne Stambaugh <[email protected]>
6 * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#include <gestfich.h>
27#include <sch_screen.h>
28#include <sch_edit_frame.h>
29#include <schematic.h>
30#include <project.h>
31#include <kiface_base.h>
32#include <reporter.h>
34#include <sch_marker.h>
35#include <connection_graph.h>
36#include <tools/ee_actions.h>
38#include <dialog_erc.h>
39#include <erc.h>
40#include <id.h>
41#include <confirm.h>
43#include <wx/ffile.h>
44#include <wx/filedlg.h>
45#include <wx/hyperlink.h>
46#include <erc_item.h>
47#include <eeschema_settings.h>
48#include <string_utils.h>
49#include <kiplatform/ui.h>
50
51// wxWidgets spends *far* too long calcuating column widths (most of it, believe it or
52// not, in repeatedly creating/destroying a wxDC to do the measurement in).
53// Use default column widths instead.
54static int DEFAULT_SINGLE_COL_WIDTH = 660;
55
56
57static SCHEMATIC* g_lastERCSchematic = nullptr;
58static bool g_lastERCRun = false;
59static std::vector<wxString> g_lastERCIgnored;
60
61
63 DIALOG_ERC_BASE( parent ),
65 m_parent( parent ),
66 m_markerTreeModel( nullptr ),
67 m_running( false ),
68 m_ercRun( false ),
69 m_centerMarkerOnIdle( nullptr ),
70 m_severities( 0 )
71{
72 m_currentSchematic = &parent->Schematic();
73
74 SetName( DIALOG_ERC_WINDOW_NAME ); // Set a window name to be able to find it
75
76 EESCHEMA_SETTINGS* settings = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
78
80
81 m_markerProvider = std::make_shared<SHEETLIST_ERC_ITEMS_PROVIDER>( &m_parent->Schematic() );
82
84 m_markerDataView->AssociateModel( m_markerTreeModel );
86
87 m_ignoredList->InsertColumn( 0, wxEmptyString, wxLIST_FORMAT_LEFT, DEFAULT_SINGLE_COL_WIDTH );
88
90 {
92
93 for( const wxString& str : g_lastERCIgnored )
94 m_ignoredList->InsertItem( m_ignoredList->GetItemCount(), str );
95 }
96
97 m_notebook->SetSelection( 0 );
98
99 SetupStandardButtons( { { wxID_OK, _( "Run ERC" ) },
100 { wxID_CANCEL, _( "Close" ) } } );
101
102 m_violationsTitleTemplate = m_notebook->GetPageText( 0 );
103 m_ignoredTitleTemplate = m_notebook->GetPageText( 1 );
104
108
110
111 Layout();
112
113 SetFocus();
114
117
118 // Now all widgets have the size fixed, call FinishDialogSettings
120}
121
122
124{
127
128 g_lastERCIgnored.clear();
129
130 for( int ii = 0; ii < m_ignoredList->GetItemCount(); ++ii )
131 g_lastERCIgnored.push_back( m_ignoredList->GetItemText( ii ) );
132
133 EESCHEMA_SETTINGS* settings = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
134 wxASSERT( settings );
135
136 if( settings )
138
139 m_markerTreeModel->DecRef();
140}
141
142
144{
145 if( m_parent->CheckAnnotate( []( ERCE_T, const wxString&, SCH_REFERENCE*, SCH_REFERENCE* )
146 { } ) )
147 {
148 if( !m_infoBar->IsShown() )
149 {
150 wxHyperlinkCtrl* button = new wxHyperlinkCtrl( m_infoBar, wxID_ANY,
151 _( "Show Annotation dialog" ),
152 wxEmptyString );
153
154 button->Bind( wxEVT_COMMAND_HYPERLINK, std::function<void( wxHyperlinkEvent& aEvent )>(
155 [&]( wxHyperlinkEvent& aEvent )
156 {
157 wxHtmlLinkEvent htmlEvent( aEvent.GetId(),
158 wxHtmlLinkInfo( aEvent.GetURL() ) );
159 OnLinkClicked( htmlEvent );
160 } ) );
161
163 m_infoBar->AddButton( button );
164 m_infoBar->ShowMessage( _( "Schematic is not fully annotated. "
165 "ERC results will be incomplete." ) );
166 }
167 }
168 else
169 {
170 if( m_infoBar->IsShown() )
171 {
173 m_infoBar->Hide();
174 }
175 }
176}
177
178
179// PROGRESS_REPORTER calls
180
182{
183 // If ERC checks ever get slow enough we'll want a progress indicator...
184 //
185 // double cur = (double) m_progress.load() / m_maxProgress;
186 // cur = std::max( 0.0, std::min( cur, 1.0 ) );
187 //
188 // m_gauge->SetValue( KiROUND( cur * 1000.0 ) );
189 // wxSafeYield( this );
190
191 return !m_cancelled;
192}
193
194
195void DIALOG_ERC::AdvancePhase( const wxString& aMessage )
196{
197 // Will also call Report( aMessage ):
199 SetCurrentProgress( 0.0 );
200}
201
202
203void DIALOG_ERC::Report( const wxString& aMessage )
204{
205 m_messages->Report( aMessage );
206}
207
208
210{
211 int numErrors = 0;
212 int numWarnings = 0;
213 int numExcluded = 0;
214
215 int numMarkers = 0;
216
217 if( m_markerProvider )
218 {
219 numMarkers += m_markerProvider->GetCount();
220 numErrors += m_markerProvider->GetCount( RPT_SEVERITY_ERROR );
221 numWarnings += m_markerProvider->GetCount( RPT_SEVERITY_WARNING );
222 numExcluded += m_markerProvider->GetCount( RPT_SEVERITY_EXCLUSION );
223 }
224
225 bool markersOverflowed = false;
226
227 // We don't currently have a limit on ERC violations, so the above is always false.
228
229 wxString num;
230 wxString msg;
231
232 if( m_ercRun )
233 {
234 num.Printf( markersOverflowed ? wxT( "%d+" ) : wxT( "%d" ), numMarkers );
235 msg.Printf( m_violationsTitleTemplate, num );
236 }
237 else
238 {
240 msg.Replace( wxT( "(%s)" ), wxEmptyString );
241 }
242
243 m_notebook->SetPageText( 0, msg );
244
245 if( m_ercRun )
246 {
247 num.Printf( wxT( "%d" ), m_ignoredList->GetItemCount() );
248 msg.sprintf( m_ignoredTitleTemplate, num );
249 }
250 else
251 {
253 msg.Replace( wxT( "(%s)" ), wxEmptyString );
254 }
255
256 m_notebook->SetPageText( 1, msg );
257
258 if( !m_ercRun && numErrors == 0 )
259 numErrors = -1;
260
261 if( !m_ercRun && numWarnings == 0 )
262 numWarnings = -1;
263
267}
268
269
270void DIALOG_ERC::OnDeleteOneClick( wxCommandEvent& aEvent )
271{
272 if( m_notebook->GetSelection() == 0 )
273 {
274 // Clear the selection. It may be the selected ERC marker.
276
278
279 // redraw the schematic
281 }
282
284}
285
286
287/* Delete the old ERC markers, over the whole hierarchy
288 */
289void DIALOG_ERC::OnDeleteAllClick( wxCommandEvent& event )
290{
291 bool includeExclusions = false;
292 int numExcluded = 0;
293
294 if( m_markerProvider )
295 numExcluded += m_markerProvider->GetCount( RPT_SEVERITY_EXCLUSION );
296
297 if( numExcluded > 0 )
298 {
299 wxMessageDialog dlg( this, _( "Delete exclusions too?" ), _( "Delete All Markers" ),
300 wxYES_NO | wxCANCEL | wxCENTER | wxICON_QUESTION );
301 dlg.SetYesNoLabels( _( "Errors and Warnings Only" ),
302 _( "Errors, Warnings and Exclusions" ) );
303
304 int ret = dlg.ShowModal();
305
306 if( ret == wxID_CANCEL )
307 return;
308 else if( ret == wxID_NO )
309 includeExclusions = true;
310 }
311
312 deleteAllMarkers( includeExclusions );
313
314 // redraw the schematic
317}
318
319
320// This is a modeless dialog so we have to handle these ourselves.
321void DIALOG_ERC::OnCancelClick( wxCommandEvent& aEvent )
322{
323 if( m_running )
324 {
325 m_cancelled = true;
326 return;
327 }
328
329 m_parent->FocusOnItem( nullptr );
330
331 Close();
332}
333
334
335void DIALOG_ERC::OnCloseErcDialog( wxCloseEvent& event )
336{
337 m_parent->FocusOnItem( nullptr );
338
339 m_parent->GetToolManager()->GetTool<EE_INSPECTION_TOOL>()->DestroyERCDialog();
340}
341
342
344
345
347{
352}
353
354
355void DIALOG_ERC::OnLinkClicked( wxHtmlLinkEvent& event )
356{
357 wxCommandEvent dummy;
359}
360
361
362void DIALOG_ERC::OnRunERCClick( wxCommandEvent& event )
363{
364 wxBusyCursor busy;
365
366 SCHEMATIC* sch = &m_parent->Schematic();
367
369
371 deleteAllMarkers( true );
372
373 std::vector<std::reference_wrapper<RC_ITEM>> violations = ERC_ITEM::GetItemsWithSeverities();
374 m_ignoredList->DeleteAllItems();
375
376 for( std::reference_wrapper<RC_ITEM>& item : violations )
377 {
378 if( sch->ErcSettings().GetSeverity( item.get().GetErrorCode() ) == RPT_SEVERITY_IGNORE )
379 {
380 m_ignoredList->InsertItem( m_ignoredList->GetItemCount(),
381 wxT( " • " ) + item.get().GetErrorText() );
382 }
383 }
384
385 Raise();
386
387 m_runningResultsBook->ChangeSelection( 0 ); // Display the "Tests Running..." tab
388 m_messages->Clear();
389 wxYield(); // Allow time slice to refresh Messages
390
391 m_running = true;
392 m_sdbSizer1Cancel->SetLabel( _( "Cancel" ) );
393 m_sdbSizer1OK->Enable( false );
394 m_deleteOneMarker->Enable( false );
395 m_deleteAllMarkers->Enable( false );
396 m_saveReport->Enable( false );
397
399
400 int itemsNotAnnotated = m_parent->CheckAnnotate(
401 []( ERCE_T aType, const wxString& aMsg, SCH_REFERENCE* aItemA, SCH_REFERENCE* aItemB )
402 {
403 std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( aType );
404 ercItem->SetErrorMessage( aMsg );
405
406 if( aItemB )
407 ercItem->SetItems( aItemA->GetSymbol(), aItemB->GetSymbol() );
408 else
409 ercItem->SetItems( aItemA->GetSymbol() );
410
411 SCH_MARKER* marker = new SCH_MARKER( ercItem, aItemA->GetSymbol()->GetPosition() );
412 aItemA->GetSheetPath().LastScreen()->Append( marker );
413 } );
414
415 testErc();
416
417 if( itemsNotAnnotated )
418 m_messages->ReportHead( wxString::Format( _( "%d symbol(s) require annotation.<br><br>" ),
419 itemsNotAnnotated ), RPT_SEVERITY_INFO );
420
421 if( m_cancelled )
422 m_messages->Report( _( "-------- ERC cancelled by user.<br><br>" ), RPT_SEVERITY_INFO );
423 else
424 m_messages->Report( _( "Done.<br><br>" ), RPT_SEVERITY_INFO );
425
426 Raise();
427 wxYield(); // Allow time slice to refresh Messages
428
429 m_running = false;
430 m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
431 m_sdbSizer1OK->Enable( true );
432 m_deleteOneMarker->Enable( true );
433 m_deleteAllMarkers->Enable( true );
434 m_saveReport->Enable( true );
435
436 if( !m_cancelled )
437 {
438 wxMilliSleep( 500 );
439 m_runningResultsBook->ChangeSelection( 1 );
441 }
442
443 m_ercRun = true;
446}
447
448
450{
451 WINDOW_THAWER thawer( m_parent );
452
454}
455
456
458{
459 wxFileName fn;
460
461 SCHEMATIC* sch = &m_parent->Schematic();
462
463 // Build the whole sheet list in hierarchy (sheet, not screen)
465
466 SCH_SCREENS screens( sch->Root() );
467 ERC_SETTINGS& settings = sch->ErcSettings();
468 ERC_TESTER tester( sch );
469
470 // Test duplicate sheet names inside a given sheet. While one can have multiple references
471 // to the same file, each must have a unique name.
473 {
474 AdvancePhase( _( "Checking sheet names..." ) );
475 tester.TestDuplicateSheetNames( true );
476 }
477
478 if( settings.IsTestEnabled( ERCE_BUS_ALIAS_CONFLICT ) )
479 {
480 AdvancePhase( _( "Checking bus conflicts..." ) );
482 }
483
484 // The connection graph has a whole set of ERC checks it can run
485 AdvancePhase( _( "Checking conflicts..." ) );
487 sch->ConnectionGraph()->RunERC();
488
489 AdvancePhase( _( "Checking units..." ) );
490
491 // Test is all units of each multiunit symbol have the same footprint assigned.
492 if( settings.IsTestEnabled( ERCE_DIFFERENT_UNIT_FP ) )
493 {
494 AdvancePhase( _( "Checking footprints..." ) );
496 }
497
498 if( settings.IsTestEnabled( ERCE_MISSING_UNIT )
501 || settings.IsTestEnabled( ERCE_MISSING_BIDI_PIN ) )
502 {
503 tester.TestMissingUnits();
504 }
505
506 AdvancePhase( _( "Checking pins..." ) );
507
508 if( settings.IsTestEnabled( ERCE_DIFFERENT_UNIT_NET ) )
510
511 // Test pins on each net against the pin connection table
514 || settings.IsTestEnabled( ERCE_PIN_NOT_DRIVEN ) )
515 {
516 tester.TestPinToPin();
517 }
518
519 // Test similar labels (i;e. labels which are identical when
520 // using case insensitive comparisons)
521 if( settings.IsTestEnabled( ERCE_SIMILAR_LABELS ) )
522 {
523 AdvancePhase( _( "Checking labels..." ) );
524 tester.TestSimilarLabels();
525 }
526
528 {
529 AdvancePhase( _( "Checking for unresolved variables..." ) );
531 }
532
533 if( settings.IsTestEnabled( ERCE_SIMULATION_MODEL ) )
534 {
535 AdvancePhase( _( "Checking SPICE models..." ) );
536 tester.TestSimModelIssues();
537 }
538
540 {
541 AdvancePhase( _( "Checking no connect pins for connections..." ) );
542 tester.TestNoConnectPins();
543 }
544
545 if( settings.IsTestEnabled( ERCE_LIB_SYMBOL_ISSUES ) )
546 {
547 AdvancePhase( _( "Checking for library symbol issues..." ) );
548 tester.TestLibSymbolIssues();
549 }
550
551 if( settings.IsTestEnabled( ERCE_ENDPOINT_OFF_GRID ) )
552 {
553 AdvancePhase( _( "Checking for off grid pins and wires..." ) );
555 }
556
558
559 // Update marker list:
561
562 // Display new markers from the current screen:
563 for( SCH_ITEM* marker : m_parent->GetScreen()->Items().OfType( SCH_MARKER_T ) )
564 {
565 m_parent->GetCanvas()->GetView()->Remove( marker );
566 m_parent->GetCanvas()->GetView()->Add( marker );
567 }
568
570}
571
572
573void DIALOG_ERC::OnERCItemSelected( wxDataViewEvent& aEvent )
574{
575 const KIID& itemID = RC_TREE_MODEL::ToUUID( aEvent.GetItem() );
576 SCH_SHEET_PATH sheet;
577 SCH_ITEM* item = m_parent->Schematic().GetSheets().GetItem( itemID, &sheet );
578
580 {
581 // we already came from a cross-probe of the marker in the document; don't go
582 // around in circles
583 }
584 else if( item && item->GetClass() != wxT( "DELETED_SHEET_ITEM" ) )
585 {
586 const RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
587
588 if( node )
589 {
590 // Determine the owning sheet for sheet-specific items
591 std::shared_ptr<ERC_ITEM> ercItem =
592 std::static_pointer_cast<ERC_ITEM>( node->m_RcItem );
593 switch( node->m_Type )
594 {
596 if( ercItem->IsSheetSpecific() )
597 sheet = ercItem->GetSpecificSheetPath();
598 break;
600 if( ercItem->MainItemHasSheetPath() )
601 sheet = ercItem->GetMainItemSheetPath();
602 break;
604 if( ercItem->AuxItemHasSheetPath() )
605 sheet = ercItem->GetAuxItemSheetPath();
606 break;
607 default:
608 break;
609 }
610 }
611
612 WINDOW_THAWER thawer( m_parent );
613
614 if( !sheet.empty() && sheet != m_parent->GetCurrentSheet() )
615 {
618
619 m_parent->SetCurrentSheet( sheet );
622 }
623
624 m_parent->FocusOnItem( item );
626 }
627
628 aEvent.Skip();
629}
630
631
632void DIALOG_ERC::OnERCItemDClick( wxDataViewEvent& aEvent )
633{
634 if( aEvent.GetItem().IsOk() )
635 {
636 // turn control over to m_parent, hide this DIALOG_ERC window,
637 // no destruction so we can preserve listbox cursor
638 if( !IsModal() )
639 Show( false );
640 }
641
642 aEvent.Skip();
643}
644
645
646void DIALOG_ERC::OnERCItemRClick( wxDataViewEvent& aEvent )
647{
648 RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
649
650 if( !node )
651 return;
652
654
655 std::shared_ptr<RC_ITEM> rcItem = node->m_RcItem;
656 wxString listName;
657 wxMenu menu;
658
659 switch( settings.GetSeverity( rcItem->GetErrorCode() ) )
660 {
661 case RPT_SEVERITY_ERROR: listName = _( "errors" ); break;
662 case RPT_SEVERITY_WARNING: listName = _( "warnings" ); break;
663 default: listName = _( "appropriate" ); break;
664 }
665
666 if( rcItem->GetParent()->IsExcluded() )
667 {
668 menu.Append( 1, _( "Remove exclusion for this violation" ),
669 wxString::Format( _( "It will be placed back in the %s list" ), listName ) );
670 }
671 else
672 {
673 menu.Append( 2, _( "Exclude this violation" ),
674 wxString::Format( _( "It will be excluded from the %s list" ), listName ) );
675 }
676
677 menu.AppendSeparator();
678
679 if( rcItem->GetErrorCode() == ERCE_PIN_TO_PIN_WARNING
680 || rcItem->GetErrorCode() == ERCE_PIN_TO_PIN_ERROR )
681 {
682 // Pin to pin severities edited through pin conflict map
683 }
684 else if( settings.GetSeverity( rcItem->GetErrorCode() ) == RPT_SEVERITY_WARNING )
685 {
686 menu.Append( 4, wxString::Format( _( "Change severity to Error for all '%s' violations" ),
687 rcItem->GetErrorText() ),
688 _( "Violation severities can also be edited in the Board Setup... dialog" ) );
689 }
690 else
691 {
692 menu.Append( 5, wxString::Format( _( "Change severity to Warning for all '%s' violations" ),
693 rcItem->GetErrorText() ),
694 _( "Violation severities can also be edited in the Board Setup... dialog" ) );
695 }
696
697 menu.Append( 6, wxString::Format( _( "Ignore all '%s' violations" ), rcItem->GetErrorText() ),
698 _( "Violations will not be checked or reported" ) );
699
700 menu.AppendSeparator();
701
702 if( rcItem->GetErrorCode() == ERCE_PIN_TO_PIN_WARNING
703 || rcItem->GetErrorCode() == ERCE_PIN_TO_PIN_ERROR )
704 {
705 menu.Append( 7, _( "Edit pin-to-pin conflict map..." ) );
706 }
707 else
708 {
709 menu.Append( 8, _( "Edit violation severities..." ),
710 _( "Open the Schematic Setup... dialog" ) );
711 }
712
713 bool modified = false;
714
715 switch( GetPopupMenuSelectionFromUser( menu ) )
716 {
717 case 1:
718 {
719 SCH_MARKER* marker = dynamic_cast<SCH_MARKER*>( node->m_RcItem->GetParent() );
720
721 if( marker )
722 {
723 marker->SetExcluded( false );
724 m_parent->GetCanvas()->GetView()->Update( marker );
725
726 // Update view
727 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
728 modified = true;
729 }
730 }
731 break;
732
733 case 2:
734 {
735 SCH_MARKER* marker = dynamic_cast<SCH_MARKER*>( node->m_RcItem->GetParent() );
736
737 if( marker )
738 {
739 marker->SetExcluded( true );
740 m_parent->GetCanvas()->GetView()->Update( marker );
741
742 // Update view
744 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
745 else
746 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->DeleteCurrentItem( false );
747
748 modified = true;
749 }
750 }
751 break;
752
753 case 4:
754 settings.SetSeverity( rcItem->GetErrorCode(), RPT_SEVERITY_ERROR );
755
756 for( SCH_ITEM* item : m_parent->GetScreen()->Items().OfType( SCH_MARKER_T ) )
757 {
758 SCH_MARKER* marker = static_cast<SCH_MARKER*>( item );
759
760 if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
761 m_parent->GetCanvas()->GetView()->Update( marker );
762 }
763
764 // Rebuild model and view
765 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->Update( m_markerProvider, m_severities );
766 modified = true;
767 break;
768
769 case 5:
770 settings.SetSeverity( rcItem->GetErrorCode(), RPT_SEVERITY_WARNING );
771
772 for( SCH_ITEM* item : m_parent->GetScreen()->Items().OfType( SCH_MARKER_T ) )
773 {
774 SCH_MARKER* marker = static_cast<SCH_MARKER*>( item );
775
776 if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
777 m_parent->GetCanvas()->GetView()->Update( marker );
778 }
779
780 // Rebuild model and view
781 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->Update( m_markerProvider, m_severities );
782 modified = true;
783 break;
784
785 case 6:
786 {
787 settings.SetSeverity( rcItem->GetErrorCode(), RPT_SEVERITY_IGNORE );
788
789 if( rcItem->GetErrorCode() == ERCE_PIN_TO_PIN_ERROR )
791
792 SCH_SCREENS ScreenList( m_parent->Schematic().Root() );
793 ScreenList.DeleteMarkers( MARKER_BASE::MARKER_ERC, rcItem->GetErrorCode() );
794
795 // Rebuild model and view
796 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->Update( m_markerProvider, m_severities );
797 modified = true;
798 }
799 break;
800
801 case 7:
802 m_parent->ShowSchematicSetupDialog( _( "Pin Conflicts Map" ) );
803 break;
804
805 case 8:
806 m_parent->ShowSchematicSetupDialog( _( "Violation Severity" ) );
807 break;
808 }
809
810 if( modified )
811 {
815 }
816}
817
818
820{
821 if( m_notebook->IsShown() )
822 {
823 if( m_notebook->GetSelection() != 0 )
824 m_notebook->SetSelection( 0 );
825
827 }
828}
829
830
832{
833 if( m_notebook->IsShown() )
834 {
835 if( m_notebook->GetSelection() != 0 )
836 m_notebook->SetSelection( 0 );
837
839 }
840}
841
842
844{
845 if( m_notebook->IsShown() )
846 {
847 m_notebook->SetSelection( 0 );
849
850 // wxWidgets on some platforms fails to correctly ensure that a selected item is
851 // visible, so we have to do it in a separate idle event.
852 m_centerMarkerOnIdle = aMarker;
853 Bind( wxEVT_IDLE, &DIALOG_ERC::centerMarkerIdleHandler, this );
854 }
855}
856
857
858void DIALOG_ERC::centerMarkerIdleHandler( wxIdleEvent& aEvent )
859{
861 m_centerMarkerOnIdle = nullptr;
862 Unbind( wxEVT_IDLE, &DIALOG_ERC::centerMarkerIdleHandler, this );
863}
864
865
867{
868 SCH_MARKER* marker = aMarker;
869
870 if( marker != nullptr )
872
873 if( m_notebook->GetSelection() != 0 )
874 return;
875
876 RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( m_markerDataView->GetCurrentItem() );
877
878 if( node && node->m_RcItem )
879 marker = dynamic_cast<SCH_MARKER*>( node->m_RcItem->GetParent() );
880
881 if( node && marker && !marker->IsExcluded() )
882 {
883 marker->SetExcluded( true );
884 m_parent->GetCanvas()->GetView()->Update( marker );
885
886 // Update view
889 else
891
895 }
896}
897
898
899void DIALOG_ERC::OnIgnoreItemRClick( wxListEvent& event )
900{
901 wxMenu menu;
902
903 menu.Append( 1, _( "Edit ignored violations..." ), _( "Open the Schematic Setup... dialog" ) );
904
905 switch( GetPopupMenuSelectionFromUser( menu ) )
906 {
907 case 1:
908 m_parent->ShowSchematicSetupDialog( _( "Violation Severity" ) );
909 break;
910 }
911}
912
913
914void DIALOG_ERC::OnSeverity( wxCommandEvent& aEvent )
915{
916 int flag = 0;
917
918 if( aEvent.GetEventObject() == m_showAll )
920 else if( aEvent.GetEventObject() == m_showErrors )
922 else if( aEvent.GetEventObject() == m_showWarnings )
924 else if( aEvent.GetEventObject() == m_showExclusions )
926
927 if( aEvent.IsChecked() )
929 else if( aEvent.GetEventObject() == m_showAll )
931 else
932 m_severities &= ~flag;
933
935
938}
939
940
941void DIALOG_ERC::deleteAllMarkers( bool aIncludeExclusions )
942{
943 // Clear current selection list to avoid selection of deleted items
945
946 m_markerTreeModel->DeleteItems( false, aIncludeExclusions, false );
947
948 SCH_SCREENS screens( m_parent->Schematic().Root() );
949 screens.DeleteAllMarkers( MARKER_BASE::MARKER_ERC, aIncludeExclusions );
950}
951
952
953void DIALOG_ERC::OnSaveReport( wxCommandEvent& aEvent )
954{
955 wxFileName fn( wxS( "ERC." ) + ReportFileExtension );
956
957 wxFileDialog dlg( this, _( "Save Report to File" ), Prj().GetProjectPath(), fn.GetFullName(),
958 ReportFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
959
960 if( dlg.ShowModal() != wxID_OK )
961 return;
962
963 fn = dlg.GetPath();
964
965 if( fn.GetExt().IsEmpty() )
966 fn.SetExt( ReportFileExtension );
967
968 if( !fn.IsAbsolute() )
969 {
970 wxString prj_path = Prj().GetProjectPath();
971 fn.MakeAbsolute( prj_path );
972 }
973
974 if( writeReport( fn.GetFullPath() ) )
975 {
976 m_messages->Report( wxString::Format( _( "Report file '%s' created." ),
977 fn.GetFullPath() ) );
978 }
979 else
980 {
981 DisplayError( this, wxString::Format( _( "Failed to create file '%s'." ),
982 fn.GetFullPath() ) );
983 }
984}
985
986
987bool DIALOG_ERC::writeReport( const wxString& aFullFileName )
988{
989 wxFFile file( aFullFileName, wxT( "wt" ) );
990
991 if( !file.IsOpened() )
992 return false;
993
994 wxString msg = wxString::Format( _( "ERC report (%s, Encoding UTF8)\n" ), DateAndTime() );
995
996 std::map<KIID, EDA_ITEM*> itemMap;
997
998 int err_count = 0;
999 int warn_count = 0;
1000 int total_count = 0;
1001 SCH_SHEET_LIST sheetList = m_parent->Schematic().GetSheets();
1002
1003 sheetList.FillItemMap( itemMap );
1004
1005 ERC_SETTINGS& settings = m_parent->Schematic().ErcSettings();
1006
1007 for( unsigned i = 0; i < sheetList.size(); i++ )
1008 {
1009 msg << wxString::Format( _( "\n***** Sheet %s\n" ), sheetList[i].PathHumanReadable() );
1010
1011 for( SCH_ITEM* aItem : sheetList[i].LastScreen()->Items().OfType( SCH_MARKER_T ) )
1012 {
1013 const SCH_MARKER* marker = static_cast<const SCH_MARKER*>( aItem );
1014 RC_ITEM* item = marker->GetRCItem().get();
1015 SEVERITY severity = settings.GetSeverity( item->GetErrorCode() );
1016
1017 if( marker->GetMarkerType() != MARKER_BASE::MARKER_ERC )
1018 continue;
1019
1020 total_count++;
1021
1022 switch( severity )
1023 {
1024 case RPT_SEVERITY_ERROR: err_count++; break;
1025 case RPT_SEVERITY_WARNING: warn_count++; break;
1026 default: break;
1027 }
1028
1029 msg << marker->GetRCItem()->ShowReport( m_parent, severity, itemMap );
1030 }
1031 }
1032
1033 msg << wxString::Format( _( "\n ** ERC messages: %d Errors %d Warnings %d\n" ),
1034 total_count, err_count, warn_count );
1035
1036 // Currently: write report using UTF8 (as usual in Kicad).
1037 // TODO: see if we can use the current encoding page (mainly for Windows users),
1038 // Or other format (HTML?)
1039 file.Write( msg );
1040
1041 // wxFFile dtor will close the file.
1042
1043 return true;
1044}
1045
1046
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
static TOOL_ACTION cancelInteractive
Definition: actions.h:63
VECTOR2D m_ScrollCenter
Current scroll center point in logical units.
Definition: base_screen.h:100
int RunERC()
Runs electrical rule checks on the connectivity graph.
Class DIALOG_ERC_BASE.
wxButton * m_saveReport
wxButton * m_sdbSizer1Cancel
wxSimplebook * m_runningResultsBook
wxCheckBox * m_showExclusions
NUMBER_BADGE * m_errorsBadge
WX_INFOBAR * m_infoBar
wxCheckBox * m_showErrors
wxNotebook * m_notebook
wxCheckBox * m_showAll
NUMBER_BADGE * m_exclusionsBadge
wxListCtrl * m_ignoredList
WX_HTML_REPORT_BOX * m_messages
wxDataViewCtrl * m_markerDataView
wxButton * m_deleteAllMarkers
NUMBER_BADGE * m_warningsBadge
wxButton * m_deleteOneMarker
wxCheckBox * m_showWarnings
wxButton * m_sdbSizer1OK
void ExcludeMarker(SCH_MARKER *aMarker=nullptr)
Exclude aMarker from the ERC list.
Definition: dialog_erc.cpp:866
const SCH_MARKER * m_centerMarkerOnIdle
Definition: dialog_erc.h:111
void OnERCItemDClick(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:632
std::shared_ptr< RC_ITEMS_PROVIDER > m_markerProvider
Definition: dialog_erc.h:105
void syncCheckboxes()
Definition: dialog_erc.cpp:346
bool m_ercRun
Definition: dialog_erc.h:109
DIALOG_ERC(SCH_EDIT_FRAME *parent)
Definition: dialog_erc.cpp:62
void testErc()
Definition: dialog_erc.cpp:457
void SelectMarker(const SCH_MARKER *aMarker)
Definition: dialog_erc.cpp:843
bool updateUI() override
Definition: dialog_erc.cpp:181
SCH_EDIT_FRAME * m_parent
Definition: dialog_erc.h:99
void OnIgnoreItemRClick(wxListEvent &event) override
Definition: dialog_erc.cpp:899
wxString m_violationsTitleTemplate
Definition: dialog_erc.h:102
void OnERCItemRClick(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:646
bool writeReport(const wxString &aFullFileName)
Definition: dialog_erc.cpp:987
void centerMarkerIdleHandler(wxIdleEvent &aEvent)
Definition: dialog_erc.cpp:858
void OnDeleteAllClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:289
void OnLinkClicked(wxHtmlLinkEvent &event) override
Definition: dialog_erc.cpp:355
int m_severities
Definition: dialog_erc.h:113
void OnRunERCClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:362
void deleteAllMarkers(bool aIncludeExclusions)
Definition: dialog_erc.cpp:941
wxString m_ignoredTitleTemplate
Definition: dialog_erc.h:103
void OnDeleteOneClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:270
void OnSaveReport(wxCommandEvent &aEvent) override
Definition: dialog_erc.cpp:953
void PrevMarker()
Definition: dialog_erc.cpp:819
void NextMarker()
Definition: dialog_erc.cpp:831
SCHEMATIC * m_currentSchematic
Definition: dialog_erc.h:100
void UpdateAnnotationWarning()
Definition: dialog_erc.cpp:143
void redrawDrawPanel()
Definition: dialog_erc.cpp:449
void Report(const wxString &aMessage) override
Display aMessage in the progress bar dialog.
Definition: dialog_erc.cpp:203
void OnERCItemSelected(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:573
RC_TREE_MODEL * m_markerTreeModel
Definition: dialog_erc.h:106
void updateDisplayedCounts()
Definition: dialog_erc.cpp:209
void OnSeverity(wxCommandEvent &aEvent) override
Definition: dialog_erc.cpp:914
bool m_running
Definition: dialog_erc.h:108
void OnCloseErcDialog(wxCloseEvent &event) override
Definition: dialog_erc.cpp:335
void OnCancelClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:321
bool Show(bool show) override
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
static TOOL_ACTION clearSelection
Clears the current selection.
Definition: ee_actions.h:56
EE_TYPE OfType(KICAD_T aType) const
Definition: sch_rtree.h:238
static std::shared_ptr< ERC_ITEM > Create(int aErrorCode)
Constructs an ERC_ITEM for the given error code.
Definition: erc_item.cpp:232
static std::vector< std::reference_wrapper< RC_ITEM > > GetItemsWithSeverities()
Definition: erc_item.h:76
Container for ERC settings.
Definition: erc_settings.h:114
bool IsTestEnabled(int aErrorCode) const
Definition: erc_settings.h:130
SEVERITY GetSeverity(int aErrorCode) const
void SetSeverity(int aErrorCode, SEVERITY aSeverity)
Definition: erc.h:48
int TestLibSymbolIssues()
Test symbols for changed library symbols and broken symbol library links.
Definition: erc.cpp:858
void TestTextVars(DS_PROXY_VIEW_ITEM *aDrawingSheet)
Check for any unresolved text variable references.
Definition: erc.cpp:171
int TestPinToPin()
Checks the full netlist against the pin-to-pin connectivity requirements.
Definition: erc.cpp:594
int TestSimilarLabels()
Checks for labels that differ only in capitalization.
Definition: erc.cpp:806
int TestDuplicateSheetNames(bool aCreateMarker)
Inside a given sheet, one cannot have sheets with duplicate names (file names can be duplicated).
Definition: erc.cpp:125
int TestMultUnitPinConflicts()
Checks if shared pins on multi-unit symbols have been connected to different nets.
Definition: erc.cpp:746
int TestOffGridEndpoints(int aGridSize)
Test pins and wire ends for being off grid.
Definition: erc.cpp:948
int TestConflictingBusAliases()
Check that there are no conflicting bus alias definitions in the schematic.
Definition: erc.cpp:300
int TestNoConnectPins()
In KiCad 5 and earlier, you could connect stuff up to pins with NC electrical type.
Definition: erc.cpp:552
int TestSimModelIssues()
Test SPICE models for various issues.
Definition: erc.cpp:1020
int TestMissingUnits()
Test for uninstantiated units of multi unit symbols.
Definition: erc.cpp:412
int TestMultiunitFootprints()
Test if all units of each multiunit symbol have the same footprint assigned.
Definition: erc.cpp:347
A specialisation of the RC_TREE_MODEL class to enable ERC errors / warnings to be resolved in a speci...
Definition: erc_item.h:38
APP_SETTINGS_BASE * KifaceSettings() const
Definition: kiface_base.h:95
const VECTOR2D & GetGridSize() const
Return the grid size.
DS_PROXY_VIEW_ITEM * GetDrawingSheet() const
Definition: sch_view.h:102
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
Definition: view.cpp:316
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
Definition: view.cpp:349
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
Definition: view.cpp:1591
GAL * GetGAL() const
Return the #GAL this view is using to draw graphical primitives.
Definition: view.h:195
Definition: kiid.h:48
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
bool IsExcluded() const
Definition: marker_base.h:97
std::shared_ptr< RC_ITEM > GetRCItem() const
Definition: marker_base.h:105
enum TYPEMARKER GetMarkerType() const
Definition: marker_base.h:95
void SetExcluded(bool aExcluded)
Definition: marker_base.h:98
void SetMaximumNumber(int aMax)
Set the maximum number to be shown on the badge.
void UpdateNumber(int aNumber, SEVERITY aSeverity)
Update the number displayed on the badge.
This implements all the tricky bits for thread safety, but the GUI is left to derived classes.
virtual void AdvancePhase() override
Use the next available virtual zone of the dialog progress bar.
virtual void SetCurrentProgress(double aProgress) override
Set the progress value to aProgress (0..1).
virtual const wxString GetProjectPath() const
Return the full path of the project.
Definition: project.cpp:126
A holder for a rule check item, DRC in Pcbnew or ERC in Eeschema.
Definition: rc_item.h:75
int GetErrorCode() const
Definition: rc_item.h:136
void PrevMarker()
Definition: rc_item.cpp:558
void SelectMarker(const MARKER_BASE *aMarker)
Definition: rc_item.cpp:607
static RC_TREE_NODE * ToNode(wxDataViewItem aItem)
Definition: rc_item.h:209
void Update(std::shared_ptr< RC_ITEMS_PROVIDER > aProvider, int aSeverities)
Definition: rc_item.cpp:289
void DeleteItems(bool aCurrentOnly, bool aIncludeExclusions, bool aDeep)
Deletes the current item or all items.
Definition: rc_item.cpp:469
void DeleteCurrentItem(bool aDeep)
Definition: rc_item.cpp:463
void CenterMarker(const MARKER_BASE *aMarker)
Definition: rc_item.cpp:620
static KIID ToUUID(wxDataViewItem aItem)
Definition: rc_item.cpp:149
void NextMarker()
Definition: rc_item.cpp:579
void ValueChanged(const RC_TREE_NODE *aNode)
Definition: rc_item.cpp:446
std::shared_ptr< RC_ITEM > m_RcItem
Definition: rc_item.h:194
NODE_TYPE m_Type
Definition: rc_item.h:193
virtual REPORTER & ReportHead(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Places the report at the beginning of the list for objects that support ordering.
Definition: reporter.h:108
Holds all the data relating to one schematic.
Definition: schematic.h:61
CONNECTION_GRAPH * ConnectionGraph() const override
Definition: schematic.h:132
SCH_SHEET_LIST GetSheets() const override
Builds and returns an updated schematic hierarchy TODO: can this be cached?
Definition: schematic.h:86
SCH_SHEET & Root() const
Definition: schematic.h:91
ERC_SETTINGS & ErcSettings() const
Definition: schematic.cpp:212
virtual void RedrawScreen(const VECTOR2I &aCenterPoint, bool aWarpPointer)
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
KIGFX::SCH_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
Schematic editor (Eeschema) main window.
void ShowSchematicSetupDialog(const wxString &aInitialPage=wxEmptyString)
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag and update other data struc...
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
void RecordERCExclusions()
Scan existing markers and record data from any that are Excluded.
SCH_SHEET_PATH & GetCurrentSheet() const
SCHEMATIC & Schematic() const
void RecalculateConnections(SCH_CLEANUP_FLAGS aCleanupFlags)
Generate the connection data for the entire schematic hierarchy.
void OnAnnotate(wxCommandEvent &event)
int CheckAnnotate(ANNOTATION_ERROR_HANDLER aErrorHandler, ANNOTATE_SCOPE_T aAnnotateScope=ANNOTATE_ALL, bool aRecursive=true)
Check for annotation errors.
Definition: annotate.cpp:441
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
void DisplayCurrentSheet()
Draw the current sheet on the display.
void ResolveERCExclusions()
Update markers to match recorded exclusions.
void FocusOnItem(SCH_ITEM *aItem)
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:147
virtual wxString GetClass() const override
Return the class name.
Definition: sch_item.h:157
A helper to define a symbol's reference designator in a schematic.
const SCH_SHEET_PATH & GetSheetPath() const
SCH_SYMBOL * GetSymbol() const
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
Definition: sch_screen.h:662
void DeleteMarkers(enum MARKER_BASE::TYPEMARKER aMarkerTyp, int aErrorCode, bool aIncludeExclusions=true)
Delete all markers of a particular type and error code.
void DeleteAllMarkers(enum MARKER_BASE::TYPEMARKER aMarkerType, bool aIncludeExclusions)
Delete all electronic rules check markers of aMarkerType from all the screens in the list.
void Append(SCH_ITEM *aItem, bool aUpdateLibSymbol=true)
Definition: sch_screen.cpp:145
EE_RTREE & Items()
Gets the full RTree, usually for iterating.
Definition: sch_screen.h:109
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
SCH_ITEM * GetItem(const KIID &aID, SCH_SHEET_PATH *aPathOut=nullptr) const
Fetch a SCH_ITEM by ID.
void FillItemMap(std::map< KIID, EDA_ITEM * > &aMap)
Fill an item cache for temporary use when many items need to be fetched.
void AnnotatePowerSymbols()
Silently annotate the not yet annotated power symbols of the entire hierarchy of the sheet path list.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
bool empty() const
Forwarded method from std::vector.
SCH_SCREEN * LastScreen()
VECTOR2I GetPosition() const override
Definition: sch_symbol.h:712
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
bool RunAction(const std::string &aActionName, bool aNow=false, T aParam=NULL)
Run the specified action.
Definition: tool_manager.h:142
void Clear()
Delete the stored messages.
void SetImmediateMode()
In immediate mode, messages are flushed as they are added.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
void RemoveAllButtons()
Remove all the buttons that have been added by the user.
Definition: wx_infobar.cpp:289
void AddButton(wxButton *aButton)
Add an already created button to the infobar.
Definition: wx_infobar.cpp:248
void ShowMessage(const wxString &aMessage, int aFlags=wxICON_INFORMATION) override
Show the info bar with the provided message and icon.
Definition: wx_infobar.cpp:142
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:300
This file is part of the common library.
static int RPT_SEVERITY_ALL
Definition: dialog_erc.cpp:343
static std::vector< wxString > g_lastERCIgnored
Definition: dialog_erc.cpp:59
static int DEFAULT_SINGLE_COL_WIDTH
Definition: dialog_erc.cpp:54
static bool g_lastERCRun
Definition: dialog_erc.cpp:58
static SCHEMATIC * g_lastERCSchematic
Definition: dialog_erc.cpp:57
#define DIALOG_ERC_WINDOW_NAME
Definition: dialog_erc.h:37
#define _(s)
ERCE_T
ERC error codes.
Definition: erc_settings.h:37
@ ERCE_POWERPIN_NOT_DRIVEN
Power input pin connected to some others pins but no power out pin to drive it.
Definition: erc_settings.h:45
@ ERCE_MISSING_POWER_INPUT_PIN
Symbol has power input pins that are not placed on the schematic.
Definition: erc_settings.h:54
@ ERCE_SIMILAR_LABELS
2 labels are equal for case insensitive comparisons.
Definition: erc_settings.h:51
@ ERCE_ENDPOINT_OFF_GRID
Pin or wire-end off grid.
Definition: erc_settings.h:41
@ ERCE_DIFFERENT_UNIT_NET
Shared pin in a multi-unit symbol is connected to more than one net.
Definition: erc_settings.h:58
@ ERCE_UNRESOLVED_VARIABLE
A text variable could not be resolved.
Definition: erc_settings.h:70
@ ERCE_SIMULATION_MODEL
An error was found in the simulation model.
Definition: erc_settings.h:71
@ ERCE_DIFFERENT_UNIT_FP
Different units of the same symbol have different footprints assigned.
Definition: erc_settings.h:52
@ ERCE_NOCONNECT_CONNECTED
A no connect symbol is connected to more than 1 pin.
Definition: erc_settings.h:48
@ ERCE_PIN_TO_PIN_WARNING
Definition: erc_settings.h:85
@ ERCE_PIN_NOT_DRIVEN
Pin connected to some others pins but no pin to drive it.
Definition: erc_settings.h:43
@ ERCE_MISSING_INPUT_PIN
Symbol has input pins that are not placed.
Definition: erc_settings.h:55
@ ERCE_MISSING_UNIT
Symbol has units that are not placed on the schematic.
Definition: erc_settings.h:57
@ ERCE_DUPLICATE_SHEET_NAME
Duplicate sheet names within a given sheet.
Definition: erc_settings.h:40
@ ERCE_MISSING_BIDI_PIN
Symbol has bi-directional pins that are not placed.
Definition: erc_settings.h:56
@ ERCE_LIB_SYMBOL_ISSUES
Library symbol changed from current symbol in schematic or the library symbol link no longer valid.
Definition: erc_settings.h:73
@ ERCE_BUS_ALIAS_CONFLICT
Conflicting bus alias definitions across sheets.
Definition: erc_settings.h:60
@ ERCE_PIN_TO_PIN_ERROR
Definition: erc_settings.h:86
const std::string ReportFileExtension
wxString ReportFileWildcard()
void ForceFocus(wxWindow *aWindow)
Pass the current focus to the window.
Definition: gtk/ui.cpp:44
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
SEVERITY
@ RPT_SEVERITY_WARNING
@ RPT_SEVERITY_ERROR
@ RPT_SEVERITY_EXCLUSION
@ RPT_SEVERITY_IGNORE
@ RPT_SEVERITY_INFO
@ NO_CLEANUP
std::vector< FAB_LAYER_COLOR > dummy
wxString DateAndTime()
@ SCH_MARKER_T
Definition: typeinfo.h:141
Definition of file extensions used in Kicad.