KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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 The 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
27#include <advanced_config.h>
28#include <gestfich.h>
29#include <sch_screen.h>
30#include <sch_edit_frame.h>
31#include <project.h>
32#include <kiface_base.h>
33#include <reporter.h>
35#include <sch_marker.h>
36#include <connection_graph.h>
37#include <tools/sch_actions.h>
39#include <dialog_erc.h>
40#include <erc/erc.h>
41#include <erc/erc_report.h>
42#include <id.h>
43#include <confirm.h>
47#include <string_utils.h>
48#include <kiplatform/ui.h>
49#include <confirm.h>
50
51#include <wx/ffile.h>
52#include <wx/filedlg.h>
53#include <wx/hyperlink.h>
54#include <wx/msgdlg.h>
55#include <sch_edit_tool.h>
56
57
58wxDEFINE_EVENT( EDA_EVT_CLOSE_ERC_DIALOG, wxCommandEvent );
59
60
61// wxWidgets spends *far* too long calculating column widths (most of it, believe it or
62// not, in repeatedly creating/destroying a wxDC to do the measurement in).
63// Use default column widths instead.
64static int DEFAULT_SINGLE_COL_WIDTH = 660;
65
66
67static SCHEMATIC* g_lastERCSchematic = nullptr;
68static bool g_lastERCRun = false;
69
70static std::vector<std::pair<wxString, int>> g_lastERCIgnored;
71
72
74 DIALOG_ERC_BASE( parent ),
76 m_parent( parent ),
77 m_markerTreeModel( nullptr ),
78 m_running( false ),
79 m_ercRun( false ),
80 m_centerMarkerOnIdle( nullptr ),
81 m_crossprobe( true ),
83 m_showAllErrors( false )
84{
85 m_currentSchematic = &parent->Schematic();
86
87 SetName( DIALOG_ERC_WINDOW_NAME ); // Set a window name to be able to find it
89
90 m_bMenu->SetBitmap( KiBitmapBundle( BITMAPS::config ) );
91
92 m_messages->SetImmediateMode();
93
94 m_markerProvider = std::make_shared<SHEETLIST_ERC_ITEMS_PROVIDER>( &m_parent->Schematic() );
95
97 m_markerDataView->AssociateModel( m_markerTreeModel );
99
100 // Prevent RTL locales from mirroring the text in the data views
101 m_markerDataView->SetLayoutDirection( wxLayout_LeftToRight );
102 m_ignoredList->SetLayoutDirection( wxLayout_LeftToRight );
103
104 m_ignoredList->InsertColumn( 0, wxEmptyString, wxLIST_FORMAT_LEFT, DEFAULT_SINGLE_COL_WIDTH );
105
107 {
109
110 for( const auto& [ str, code ] : g_lastERCIgnored )
111 {
112 wxListItem listItem;
113 listItem.SetId( m_ignoredList->GetItemCount() );
114 listItem.SetText( str );
115 listItem.SetData( code );
116
117 m_ignoredList->InsertItem( listItem );
118 }
119 }
120
121 m_notebook->SetSelection( 0 );
122
123 SetupStandardButtons( { { wxID_OK, _( "Run ERC" ) },
124 { wxID_CANCEL, _( "Close" ) } } );
125
126 m_violationsTitleTemplate = m_notebook->GetPageText( 0 );
127 m_ignoredTitleTemplate = m_notebook->GetPageText( 1 );
128
129 m_errorsBadge->SetMaximumNumber( 999 );
130 m_warningsBadge->SetMaximumNumber( 999 );
131 m_exclusionsBadge->SetMaximumNumber( 999 );
132
134
135 Layout();
136
137 SetFocus();
138
140 {
141 m_crossprobe = cfg->m_ERCDialog.crossprobe;
142 m_scroll_on_crossprobe = cfg->m_ERCDialog.scroll_on_crossprobe;
143 m_showAllErrors = cfg->m_ERCDialog.show_all_errors;
144 }
145
146 // Now all widgets have the size fixed, call FinishDialogSettings
148}
149
150
152{
155
156 g_lastERCIgnored.clear();
157
158 for( int ii = 0; ii < m_ignoredList->GetItemCount(); ++ii )
159 g_lastERCIgnored.push_back( { m_ignoredList->GetItemText( ii ), m_ignoredList->GetItemData( ii ) } );
160
162 {
163 cfg->m_ERCDialog.crossprobe = m_crossprobe;
164 cfg->m_ERCDialog.scroll_on_crossprobe = m_scroll_on_crossprobe;
165 cfg->m_ERCDialog.show_all_errors = m_showAllErrors;
166 }
167
168 m_markerTreeModel->DecRef();
169}
170
171
173{
174 if( m_parent->CheckAnnotate(
175 []( ERCE_T, const wxString&, SCH_REFERENCE*, SCH_REFERENCE* )
176 {
177 } ) )
178 {
179 if( !m_infoBar->IsShownOnScreen() )
180 {
181 wxHyperlinkCtrl* button = new wxHyperlinkCtrl( m_infoBar, wxID_ANY, _( "Show Annotation dialog" ),
182 wxEmptyString );
183
184 button->Bind( wxEVT_COMMAND_HYPERLINK, std::function<void( wxHyperlinkEvent& aEvent )>(
185 [&]( wxHyperlinkEvent& aEvent )
186 {
187 wxHtmlLinkEvent htmlEvent( aEvent.GetId(), wxHtmlLinkInfo( aEvent.GetURL() ) );
188 OnLinkClicked( htmlEvent );
189 } ) );
190
191 m_infoBar->RemoveAllButtons();
192 m_infoBar->AddButton( button );
193 m_infoBar->ShowMessage( _( "Schematic is not fully annotated. ERC results will be incomplete." ) );
194 }
195 }
196 else
197 {
198 if( m_infoBar->IsShownOnScreen() )
199 {
200 m_infoBar->RemoveAllButtons();
201 m_infoBar->Hide();
202 }
203 }
204}
205
206
208{
209 int severities = 0;
210
211 if( m_showErrors->GetValue() )
212 severities |= RPT_SEVERITY_ERROR;
213
214 if( m_showWarnings->GetValue() )
215 severities |= RPT_SEVERITY_WARNING;
216
217 if( m_showExclusions->GetValue() )
218 severities |= RPT_SEVERITY_EXCLUSION;
219
220 return severities;
221}
222
223
224void DIALOG_ERC::OnMenu( wxCommandEvent& event )
225{
226 // Build a pop menu:
227 wxMenu menu;
228
229 menu.Append( 4206, _( "Cross-probe Selected Items" ),
230 _( "Highlight corresponding items on canvas when selected in the ERC list" ),
231 wxITEM_CHECK );
232 menu.Check( 4206, m_crossprobe );
233
234 menu.Append( 4207, _( "Center on Cross-probe" ),
235 _( "When cross-probing, scroll the canvas so that the item is visible" ),
236 wxITEM_CHECK );
237 menu.Check( 4207, m_scroll_on_crossprobe );
238
239 menu.Append( 4208, _( "Show all errors" ),
240 _( "Show duplicate ERC markers on all applicable pins" ),
241 wxITEM_CHECK );
242 menu.Check( 4208, m_showAllErrors );
243
244 // menu_id is the selected submenu id from the popup menu or wxID_NONE
245 int menu_id = m_bMenu->GetPopupMenuSelectionFromUser( menu );
246
247 if( menu_id == 0 || menu_id == 4206 )
248 {
250 }
251 else if( menu_id == 1 || menu_id == 4207 )
252 {
254 }
255 else if( menu_id == 2 || menu_id == 4208 )
256 {
258 }
259}
260
261
262void DIALOG_ERC::OnCharHook( wxKeyEvent& aEvt )
263{
264 if( int hotkey = aEvt.GetKeyCode() )
265 {
266 if( aEvt.ControlDown() )
267 hotkey |= MD_CTRL;
268 if( aEvt.ShiftDown() )
269 hotkey |= MD_SHIFT;
270 if( aEvt.AltDown() )
271 hotkey |= MD_ALT;
272
273 if( hotkey == ACTIONS::excludeMarker.GetHotKey() )
274 {
276 return;
277 }
278 }
279
281}
282
283
285{
286 UpdateData();
287 return true;
288}
289
290
292{
293 // If ERC checks ever get slow enough we'll want a progress indicator...
294 //
295 // double cur = (double) m_progress.load() / m_maxProgress;
296 // cur = std::max( 0.0, std::min( cur, 1.0 ) );
297 //
298 // m_gauge->SetValue( KiROUND( cur * 1000.0 ) );
299 // wxSafeYield( this );
300
301 return !m_cancelled;
302}
303
304
305void DIALOG_ERC::AdvancePhase( const wxString& aMessage )
306{
307 // Will also call Report( aMessage ):
309 SetCurrentProgress( 0.0 );
310}
311
312
313void DIALOG_ERC::Report( const wxString& aMessage )
314{
315 m_messages->Report( aMessage );
316}
317
318
324
325
327{
328 int numErrors = 0;
329 int numWarnings = 0;
330 int numExcluded = 0;
331
332 int numMarkers = 0;
333
334 if( m_markerProvider )
335 {
336 numMarkers += m_markerProvider->GetCount();
337 numErrors += m_markerProvider->GetCount( RPT_SEVERITY_ERROR );
338 numWarnings += m_markerProvider->GetCount( RPT_SEVERITY_WARNING );
339 numExcluded += m_markerProvider->GetCount( RPT_SEVERITY_EXCLUSION );
340 }
341
342 bool markersOverflowed = false;
343
344 // We don't currently have a limit on ERC violations, so the above is always false.
345
346 wxString num;
347 wxString msg;
348
349 if( m_ercRun )
350 {
351 num.Printf( markersOverflowed ? wxT( "%d+" ) : wxT( "%d" ), numMarkers );
352 msg.Printf( m_violationsTitleTemplate, num );
353 }
354 else
355 {
357 msg.Replace( wxT( "(%s)" ), wxEmptyString );
358 }
359
360 m_notebook->SetPageText( 0, msg );
361
362 if( m_ercRun )
363 {
364 num.Printf( wxT( "%d" ), m_ignoredList->GetItemCount() );
365 msg.sprintf( m_ignoredTitleTemplate, num );
366 }
367 else
368 {
370 msg.Replace( wxT( "(%s)" ), wxEmptyString );
371 }
372
373 m_notebook->SetPageText( 1, msg );
374
375 if( !m_ercRun && numErrors == 0 )
376 numErrors = -1;
377
378 if( !m_ercRun && numWarnings == 0 )
379 numWarnings = -1;
380
381 m_errorsBadge->UpdateNumber( numErrors, RPT_SEVERITY_ERROR );
382 m_warningsBadge->UpdateNumber( numWarnings, RPT_SEVERITY_WARNING );
383 m_exclusionsBadge->UpdateNumber( numExcluded, RPT_SEVERITY_EXCLUSION );
384}
385
386
387void DIALOG_ERC::OnDeleteOneClick( wxCommandEvent& aEvent )
388{
389 if( m_notebook->GetSelection() == 0 )
390 {
391 // Clear the selection. It may be the selected ERC marker.
392 m_parent->GetToolManager()->RunAction( ACTIONS::selectionClear );
393
394 m_markerTreeModel->DeleteCurrentItem( true );
395
396 // redraw the schematic
398 }
399
401}
402
403
404void DIALOG_ERC::OnDeleteAllClick( wxCommandEvent& event )
405{
406 bool includeExclusions = false;
407 int numExcluded = 0;
408
409 if( m_markerProvider )
410 numExcluded += m_markerProvider->GetCount( RPT_SEVERITY_EXCLUSION );
411
412 if( numExcluded > 0 )
413 {
414 KICAD_MESSAGE_DIALOG dlg( this, _( "Delete exclusions too?" ), _( "Delete All Markers" ),
415 wxYES_NO | wxCANCEL | wxCENTER | wxICON_QUESTION );
416 dlg.SetYesNoLabels( _( "Errors and Warnings Only" ),
417 _( "Errors, Warnings and Exclusions" ) );
418
419 int ret = dlg.ShowModal();
420
421 if( ret == wxID_CANCEL )
422 return;
423 else if( ret == wxID_NO )
424 includeExclusions = true;
425 }
426
427 deleteAllMarkers( includeExclusions );
428 m_ercRun = false;
429
430 // redraw the schematic
433}
434
435
436void DIALOG_ERC::OnCancelClick( wxCommandEvent& aEvent )
437{
438 if( m_running )
439 {
440 m_cancelled = true;
441 return;
442 }
443
444 m_parent->ClearFocus();
445
446 aEvent.Skip();
447}
448
449
450void DIALOG_ERC::OnCloseErcDialog( wxCloseEvent& aEvent )
451{
452 m_parent->ClearFocus();
453
454 // Dialog is mode-less so let the parent know that it needs to be destroyed.
455 if( !IsModal() && !IsQuasiModal() )
456 {
457 if( wxWindow* parent = GetParent() )
458 wxQueueEvent( parent, new wxCommandEvent( EDA_EVT_CLOSE_ERC_DIALOG, wxID_ANY ) );
459 }
460
461 aEvent.Skip();
462}
463
464
465void DIALOG_ERC::OnLinkClicked( wxHtmlLinkEvent& event )
466{
467 m_parent->OnAnnotate();
468}
469
470
471void DIALOG_ERC::OnRunERCClick( wxCommandEvent& event )
472{
473 wxBusyCursor busy;
474
475 SCHEMATIC* sch = &m_parent->Schematic();
476
478
479 sch->RecordERCExclusions();
480 deleteAllMarkers( true );
481
482 std::vector<std::reference_wrapper<RC_ITEM>> violations = ERC_ITEM::GetItemsWithSeverities();
483 m_ignoredList->DeleteAllItems();
484
485 for( std::reference_wrapper<RC_ITEM>& item : violations )
486 {
487 if( sch->ErcSettings().GetSeverity( item.get().GetErrorCode() ) == RPT_SEVERITY_IGNORE )
488 {
489 wxListItem listItem;
490 listItem.SetId( m_ignoredList->GetItemCount() );
491 listItem.SetText( wxT( " • " ) + item.get().GetErrorText( true ) );
492 listItem.SetData( item.get().GetErrorCode() );
493
494 m_ignoredList->InsertItem( listItem );
495 }
496 }
497
498 m_ignoredList->SetColumnWidth( 0, m_ignoredList->GetParent()->GetClientSize().x - 20 );
499
500 m_cancelled = false;
501 Raise();
502
503 m_runningResultsBook->ChangeSelection( 0 ); // Display the "Tests Running..." tab
504 m_messages->Clear();
505 wxSafeYield(); // Allow time slice to refresh Messages
506
507 m_running = true;
508 m_sdbSizer1Cancel->SetLabel( _( "Cancel" ) );
509 m_sdbSizer1OK->Enable( false );
510 m_deleteOneMarker->Enable( false );
511 m_deleteAllMarkers->Enable( false );
512 m_saveReport->Enable( false );
513
514 int itemsNotAnnotated = m_parent->CheckAnnotate(
515 []( ERCE_T aType, const wxString& aMsg, SCH_REFERENCE* aItemA, SCH_REFERENCE* aItemB )
516 {
517 std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( aType );
518 ercItem->SetErrorMessage( aMsg );
519
520 if( aItemB )
521 ercItem->SetItems( aItemA->GetSymbol(), aItemB->GetSymbol() );
522 else
523 ercItem->SetItems( aItemA->GetSymbol() );
524
525 SCH_MARKER* marker = new SCH_MARKER( std::move( ercItem ), aItemA->GetSymbol()->GetPosition() );
526 aItemA->GetSheetPath().LastScreen()->Append( marker );
527 } );
528
529 testErc();
530
531 if( itemsNotAnnotated )
532 {
533 m_messages->ReportHead( wxString::Format( _( "%d symbol(s) require annotation.<br><br>" ),
534 itemsNotAnnotated ),
536 }
537
538 if( m_cancelled )
539 m_messages->Report( _( "-------- ERC cancelled by user.<br><br>" ), RPT_SEVERITY_INFO );
540 else
541 m_messages->Report( _( "Done.<br><br>" ), RPT_SEVERITY_INFO );
542
543 Raise();
544 wxSafeYield(); // Allow time slice to refresh Messages
545
546 m_running = false;
547 m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
548 m_sdbSizer1OK->Enable( true );
549 m_deleteOneMarker->Enable( true );
550 m_deleteAllMarkers->Enable( true );
551 m_saveReport->Enable( true );
552
553 if( !m_cancelled )
554 {
555 m_sdbSizer1Cancel->SetDefault();
556
557 // wxWidgets has a tendency to keep both buttons highlighted without the following:
558 m_sdbSizer1OK->Enable( false );
559
560 wxMilliSleep( 500 );
561 m_runningResultsBook->ChangeSelection( 1 );
563
564 // now re-enable m_sdbSizerOK button
565 m_sdbSizer1OK->Enable( true );
566 }
567
568 m_ercRun = true;
571 // set float level again, it can be lost due to window events during test run
573}
574
575
577{
578 WINDOW_THAWER thawer( m_parent );
579
580 m_parent->GetCanvas()->Refresh();
581}
582
583
585{
586 wxFileName fn;
587
588 SCHEMATIC* sch = &m_parent->Schematic();
589
590 SCH_SCREENS screens( sch->Root() );
591 ERC_TESTER tester( sch, m_showAllErrors );
592
593 {
594 wxBusyCursor dummy;
595 tester.RunTests( m_parent->GetCanvas()->GetView()->GetDrawingSheet(), m_parent,
596 m_parent->Kiway().KiFACE( KIWAY::FACE_CVPCB ), &m_parent->Prj(), this );
597 }
598
599 // Update marker list:
601
602 // Display new markers from the current screen:
603 for( SCH_ITEM* marker : m_parent->GetScreen()->Items().OfType( SCH_MARKER_T ) )
604 {
605 m_parent->GetCanvas()->GetView()->Remove( marker );
606 m_parent->GetCanvas()->GetView()->Add( marker );
607 }
608
609 m_parent->GetCanvas()->Refresh();
610}
611
612
613void DIALOG_ERC::OnERCItemSelected( wxDataViewEvent& aEvent )
614{
615 if( !m_crossprobe )
616 {
617 aEvent.Skip();
618 return;
619 }
620
621 const KIID& itemID = RC_TREE_MODEL::ToUUID( aEvent.GetItem() );
622 SCH_SHEET_PATH sheet;
623 SCH_ITEM* item = m_parent->Schematic().ResolveItem( itemID, &sheet, true );
624
626 {
627 // we already came from a cross-probe of the marker in the document; don't go
628 // around in circles
629 }
630 else if( item && item->GetClass() != wxT( "DELETED_SHEET_ITEM" ) )
631 {
632 const RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
633
634 if( node )
635 {
636 // Determine the owning sheet for sheet-specific items
637 std::shared_ptr<ERC_ITEM> ercItem = std::static_pointer_cast<ERC_ITEM>( node->m_RcItem );
638
639 switch( node->m_Type )
640 {
642 if( ercItem->IsSheetSpecific() )
643 sheet = ercItem->GetSpecificSheetPath();
644 break;
646 if( ercItem->MainItemHasSheetPath() )
647 sheet = ercItem->GetMainItemSheetPath();
648 break;
650 if( ercItem->AuxItemHasSheetPath() )
651 sheet = ercItem->GetAuxItemSheetPath();
652 break;
653 default:
654 break;
655 }
656 }
657
658 WINDOW_THAWER thawer( m_parent );
659
660 if( !sheet.empty() && sheet != m_parent->GetCurrentSheet() )
661 {
662 m_parent->GetToolManager()->RunAction<SCH_SHEET_PATH*>( SCH_ACTIONS::changeSheet, &sheet );
663 m_parent->RedrawScreen( m_parent->GetScreen()->m_ScrollCenter, false );
664 }
665
666 m_parent->FocusOnItem( item, m_scroll_on_crossprobe );
668 }
669
670 aEvent.Skip();
671}
672
673
674void DIALOG_ERC::OnERCItemDClick( wxDataViewEvent& aEvent )
675{
676 if( aEvent.GetItem().IsOk() )
677 {
678 // turn control over to m_parent, hide this DIALOG_ERC window,
679 // no destruction so we can preserve listbox cursor
680 if( !IsModal() )
681 Show( false );
682 }
683
684 aEvent.Skip();
685}
686
687
688void DIALOG_ERC::OnERCItemRClick( wxDataViewEvent& aEvent )
689{
690 TOOL_MANAGER* toolMgr = m_parent->GetToolManager();
691 SCH_INSPECTION_TOOL* inspectionTool = toolMgr->GetTool<SCH_INSPECTION_TOOL>();
692 SCH_EDIT_TOOL* editTool = toolMgr->GetTool<SCH_EDIT_TOOL>();
693 RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
694
695 if( !node )
696 return;
697
698 ERC_SETTINGS& settings = m_parent->Schematic().ErcSettings();
699
700 std::shared_ptr<RC_ITEM> rcItem = node->m_RcItem;
701 wxString listName;
702 wxMenu menu;
703
704 switch( settings.GetSeverity( rcItem->GetErrorCode() ) )
705 {
706 case RPT_SEVERITY_ERROR: listName = _( "errors" ); break;
707 case RPT_SEVERITY_WARNING: listName = _( "warnings" ); break;
708 default: listName = _( "appropriate" ); break;
709 }
710
711 enum MENU_IDS
712 {
713 ID_EDIT_EXCLUSION_COMMENT = 4467,
714 ID_REMOVE_EXCLUSION,
715 ID_REMOVE_EXCLUSION_ALL,
716 ID_ADD_EXCLUSION,
717 ID_ADD_EXCLUSION_WITH_COMMENT,
718 ID_ADD_EXCLUSION_ALL,
719 ID_INSPECT_VIOLATION,
720 ID_FIX_VIOLATION,
721 ID_EDIT_PIN_CONFLICT_MAP,
722 ID_EDIT_CONNECTION_GRID,
723 ID_SET_SEVERITY_TO_ERROR,
724 ID_SET_SEVERITY_TO_WARNING,
725 ID_SET_SEVERITY_TO_IGNORE,
726 ID_EDIT_SEVERITIES,
727 };
728
729 if( rcItem->GetParent()->IsExcluded() )
730 {
731 menu.Append( ID_REMOVE_EXCLUSION,
732 _( "Remove exclusion for this violation" ),
733 wxString::Format( _( "It will be placed back in the %s list" ), listName ) );
734
735 menu.Append( ID_EDIT_EXCLUSION_COMMENT,
736 _( "Edit exclusion comment..." ) );
737 }
738 else
739 {
740 menu.Append( ID_ADD_EXCLUSION,
741 _( "Exclude this violation" ),
742 wxString::Format( _( "It will be excluded from the %s list" ), listName ) );
743
744 menu.Append( ID_ADD_EXCLUSION_WITH_COMMENT,
745 _( "Exclude with comment..." ),
746 wxString::Format( _( "It will be excluded from the %s list" ), listName ) );
747 }
748
749 menu.AppendSeparator();
750
751 wxString inspectERCErrorMenuText = inspectionTool->InspectERCErrorMenuText( rcItem );
752 wxString fixERCErrorMenuText = editTool->FixERCErrorMenuText( rcItem );
753
754 if( !inspectERCErrorMenuText.IsEmpty() || !fixERCErrorMenuText.IsEmpty() )
755 {
756 if( !inspectERCErrorMenuText.IsEmpty() )
757 menu.Append( ID_INSPECT_VIOLATION, inspectERCErrorMenuText );
758
759 if( !fixERCErrorMenuText.IsEmpty() )
760 menu.Append( ID_FIX_VIOLATION, fixERCErrorMenuText );
761
762 menu.AppendSeparator();
763 }
764
765 if( rcItem->GetErrorCode() == ERCE_PIN_TO_PIN_WARNING
766 || rcItem->GetErrorCode() == ERCE_PIN_TO_PIN_ERROR )
767 {
768 // Pin to pin severities edited through pin conflict map
769 }
770 else if( settings.GetSeverity( rcItem->GetErrorCode() ) == RPT_SEVERITY_WARNING )
771 {
772 menu.Append( ID_SET_SEVERITY_TO_ERROR,
773 wxString::Format( _( "Change severity to Error for all '%s' violations" ),
774 rcItem->GetErrorText( true ) ),
775 _( "Violation severities can also be edited in the Schematic Setup... dialog" ) );
776 }
777 else
778 {
779 menu.Append( ID_SET_SEVERITY_TO_WARNING,
780 wxString::Format( _( "Change severity to Warning for all '%s' violations" ),
781 rcItem->GetErrorText( true ) ),
782 _( "Violation severities can also be edited in the Schematic Setup... "
783 "dialog" ) );
784 }
785
786 menu.Append( ID_SET_SEVERITY_TO_IGNORE,
787 wxString::Format( _( "Ignore all '%s' violations" ), rcItem->GetErrorText( true ) ),
788 _( "Violations will not be checked or reported" ) );
789
790 menu.AppendSeparator();
791
792 if( rcItem->GetErrorCode() == ERCE_PIN_TO_PIN_WARNING
793 || rcItem->GetErrorCode() == ERCE_PIN_TO_PIN_ERROR )
794 {
795 menu.Append( ID_EDIT_PIN_CONFLICT_MAP,
796 _( "Edit pin-to-pin conflict map..." ),
797 _( "Open the Schematic Setup... dialog" ) );
798 }
799 else
800 {
801 menu.Append( ID_EDIT_SEVERITIES,
802 _( "Edit violation severities..." ),
803 _( "Open the Schematic Setup... dialog" ) );
804 }
805
806 if( rcItem->GetErrorCode() == ERCE_ENDPOINT_OFF_GRID )
807 {
808 menu.Append( ID_EDIT_CONNECTION_GRID,
809 _( "Edit connection grid spacing..." ),
810 _( "Open the Schematic Setup... dialog" ) );
811 }
812
813 bool modified = false;
814 int command = GetPopupMenuSelectionFromUser( menu );
815
816 switch( command )
817 {
818 case ID_EDIT_EXCLUSION_COMMENT:
819 if( SCH_MARKER* marker = dynamic_cast<SCH_MARKER*>( node->m_RcItem->GetParent() ) )
820 {
821 WX_TEXT_ENTRY_DIALOG dlg( this, wxEmptyString, _( "Exclusion Comment" ), marker->GetComment(), true );
822
823 if( dlg.ShowModal() == wxID_CANCEL )
824 break;
825
826 marker->SetExcluded( true, dlg.GetValue() );
827
828 // Update view
829 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
830 modified = true;
831 }
832
833 break;
834
835 case ID_REMOVE_EXCLUSION:
836 if( SCH_MARKER* marker = dynamic_cast<SCH_MARKER*>( node->m_RcItem->GetParent() ) )
837 {
838 marker->SetExcluded( false );
839 m_parent->GetCanvas()->GetView()->Update( marker );
840
841 // Update view
842 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
843 modified = true;
844 }
845
846 break;
847
848 case ID_ADD_EXCLUSION:
849 case ID_ADD_EXCLUSION_WITH_COMMENT:
850 if( SCH_MARKER* marker = dynamic_cast<SCH_MARKER*>( node->m_RcItem->GetParent() ) )
851 {
852 wxString comment;
853
854 if( command == ID_ADD_EXCLUSION_WITH_COMMENT )
855 {
856 WX_TEXT_ENTRY_DIALOG dlg( this, wxEmptyString, _( "Exclusion Comment" ), wxEmptyString, true );
857
858 if( dlg.ShowModal() == wxID_CANCEL )
859 break;
860
861 comment = dlg.GetValue();
862 }
863
864 marker->SetExcluded( true, comment );
865
866 m_parent->GetCanvas()->GetView()->Update( marker );
867
868 // Update view
870 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
871 else
872 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->DeleteCurrentItem( false );
873
874 modified = true;
875 }
876
877 break;
878
879 case ID_INSPECT_VIOLATION:
880 inspectionTool->InspectERCError( node->m_RcItem );
881 break;
882
883 case ID_FIX_VIOLATION:
884 editTool->FixERCError( node->m_RcItem );
885 break;
886
887 case ID_SET_SEVERITY_TO_ERROR:
888 settings.SetSeverity( rcItem->GetErrorCode(), RPT_SEVERITY_ERROR );
889
890 for( SCH_ITEM* item : m_parent->GetScreen()->Items().OfType( SCH_MARKER_T ) )
891 {
892 SCH_MARKER* marker = static_cast<SCH_MARKER*>( item );
893
894 if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
895 m_parent->GetCanvas()->GetView()->Update( marker );
896 }
897
898 // Rebuild model and view
899 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->Update( m_markerProvider, getSeverities() );
900 modified = true;
901 break;
902
903 case ID_SET_SEVERITY_TO_WARNING:
904 settings.SetSeverity( rcItem->GetErrorCode(), RPT_SEVERITY_WARNING );
905
906 for( SCH_ITEM* item : m_parent->GetScreen()->Items().OfType( SCH_MARKER_T ) )
907 {
908 SCH_MARKER* marker = static_cast<SCH_MARKER*>( item );
909
910 if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
911 m_parent->GetCanvas()->GetView()->Update( marker );
912 }
913
914 // Rebuild model and view
915 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->Update( m_markerProvider, getSeverities() );
916 modified = true;
917 break;
918
919 case ID_SET_SEVERITY_TO_IGNORE:
920 {
921 settings.SetSeverity( rcItem->GetErrorCode(), RPT_SEVERITY_IGNORE );
922
923 if( rcItem->GetErrorCode() == ERCE_PIN_TO_PIN_ERROR )
925
926 wxListItem listItem;
927 listItem.SetId( m_ignoredList->GetItemCount() );
928 listItem.SetText( wxT( " • " ) + rcItem->GetErrorText( true ) );
929 listItem.SetData( rcItem->GetErrorCode() );
930
931 m_ignoredList->InsertItem( listItem );
932
933 // Clear the selection before deleting markers. It may be some selected ERC markers.
934 // Deleting a selected marker without deselecting it first generates a crash
935 m_parent->GetToolManager()->RunAction( ACTIONS::selectionClear );
936
937 SCH_SCREENS ScreenList( m_parent->Schematic().Root() );
938 ScreenList.DeleteMarkers( MARKER_BASE::MARKER_ERC, rcItem->GetErrorCode() );
939
940 // Rebuild model and view
941 static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->Update( m_markerProvider, getSeverities() );
942 modified = true;
943 break;
944 }
945
946 case ID_EDIT_PIN_CONFLICT_MAP:
947 m_parent->ShowSchematicSetupDialog( _( "Pin Conflicts Map" ) );
948 break;
949
950 case ID_EDIT_SEVERITIES:
951 m_parent->ShowSchematicSetupDialog( _( "Violation Severity" ) );
952 break;
953
954 case ID_EDIT_CONNECTION_GRID:
955 m_parent->ShowSchematicSetupDialog( _( "Formatting" ) );
956 break;
957 }
958
959 if( modified )
960 {
963 m_parent->OnModify();
964 }
965}
966
967
968void DIALOG_ERC::OnIgnoredItemRClick( wxListEvent& event )
969{
970 ERC_SETTINGS& settings = m_parent->Schematic().ErcSettings();
971 int errorCode = (int) event.m_item.GetData();
972 wxMenu menu;
973
974 menu.Append( RPT_SEVERITY_ERROR, _( "Error" ), wxEmptyString, wxITEM_CHECK );
975 menu.Append( RPT_SEVERITY_WARNING, _( "Warning" ), wxEmptyString, wxITEM_CHECK );
976 menu.Append( RPT_SEVERITY_IGNORE, _( "Ignore" ), wxEmptyString, wxITEM_CHECK );
977
978 menu.Check( settings.GetSeverity( errorCode ), true );
979
980 int severity = GetPopupMenuSelectionFromUser( menu );
981
982 if( severity > 0 )
983 {
984 if( settings.GetSeverity( errorCode ) != severity )
985 {
986 settings.SetSeverity( errorCode, (SEVERITY) severity );
987
990 m_parent->OnModify();
991 }
992 }
993}
994
995
997{
998 if( m_notebook->IsShown() )
999 {
1000 if( m_notebook->GetSelection() != 0 )
1001 m_notebook->SetSelection( 0 );
1002
1003 m_markerTreeModel->PrevMarker();
1004 }
1005}
1006
1007
1009{
1010 if( m_notebook->IsShown() )
1011 {
1012 if( m_notebook->GetSelection() != 0 )
1013 m_notebook->SetSelection( 0 );
1014
1015 m_markerTreeModel->NextMarker();
1016 }
1017}
1018
1019
1021{
1022 if( m_notebook->IsShown() )
1023 {
1024 m_notebook->SetSelection( 0 );
1025 m_markerTreeModel->SelectMarker( aMarker );
1026
1027 // wxWidgets on some platforms fails to correctly ensure that a selected item is
1028 // visible, so we have to do it in a separate idle event.
1029 m_centerMarkerOnIdle = aMarker;
1030 Bind( wxEVT_IDLE, &DIALOG_ERC::centerMarkerIdleHandler, this );
1031 }
1032}
1033
1034
1035void DIALOG_ERC::centerMarkerIdleHandler( wxIdleEvent& aEvent )
1036{
1037 if( m_markerTreeModel->GetView()->IsFrozen() )
1038 return;
1039
1040 m_markerTreeModel->CenterMarker( m_centerMarkerOnIdle );
1041 m_centerMarkerOnIdle = nullptr;
1042 Unbind( wxEVT_IDLE, &DIALOG_ERC::centerMarkerIdleHandler, this );
1043}
1044
1045
1047{
1048 SCH_MARKER* marker = aMarker;
1049
1050 if( marker != nullptr )
1051 m_markerTreeModel->SelectMarker( marker );
1052
1053 if( m_notebook->GetSelection() != 0 )
1054 return;
1055
1056 RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( m_markerDataView->GetCurrentItem() );
1057
1058 if( node && node->m_RcItem )
1059 marker = dynamic_cast<SCH_MARKER*>( node->m_RcItem->GetParent() );
1060
1061 if( node && marker && !marker->IsExcluded() )
1062 {
1063 marker->SetExcluded( true );
1064 m_parent->GetCanvas()->GetView()->Update( marker );
1065
1066 // Update view
1068 m_markerTreeModel->ValueChanged( node );
1069 else
1070 m_markerTreeModel->DeleteCurrentItem( false );
1071
1074 m_parent->OnModify();
1075 }
1076}
1077
1078
1079void DIALOG_ERC::OnEditViolationSeverities( wxHyperlinkEvent& aEvent )
1080{
1081 m_parent->ShowSchematicSetupDialog( _( "Violation Severity" ) );
1082}
1083
1084
1085void DIALOG_ERC::OnSeverity( wxCommandEvent& aEvent )
1086{
1087 if( aEvent.GetEventObject() == m_showAll )
1088 {
1089 m_showErrors->SetValue( true );
1090 m_showWarnings->SetValue( aEvent.IsChecked() );
1091 m_showExclusions->SetValue( aEvent.IsChecked() );
1092 }
1093
1094 UpdateData();
1095}
1096
1097
1098void DIALOG_ERC::deleteAllMarkers( bool aIncludeExclusions )
1099{
1100 // Clear current selection list to avoid selection of deleted items
1101 // Freeze to avoid repainting the dialog, which can cause a RePaint()
1102 // of the screen as well
1103 Freeze();
1104
1105 m_parent->GetToolManager()->RunAction( ACTIONS::selectionClear );
1106
1107 m_markerTreeModel->DeleteItems( false, aIncludeExclusions, false );
1108
1109 SCH_SCREENS screens( m_parent->Schematic().Root() );
1110 screens.DeleteAllMarkers( MARKER_BASE::MARKER_ERC, aIncludeExclusions );
1111
1112 Thaw();
1113}
1114
1115
1116void DIALOG_ERC::OnSaveReport( wxCommandEvent& aEvent )
1117{
1118 wxFileName fn( wxS( "ERC." ) + wxString( FILEEXT::ReportFileExtension ) );
1119
1120 wxFileDialog dlg( this, _( "Save Report File" ), Prj().GetProjectPath(), fn.GetFullName(),
1122 wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
1123
1125
1126 if( dlg.ShowModal() != wxID_OK )
1127 return;
1128
1129 fn = dlg.GetPath();
1130
1131 if( fn.GetExt().IsEmpty() )
1132 fn.SetExt( FILEEXT::ReportFileExtension );
1133
1134 if( !fn.IsAbsolute() )
1135 {
1136 wxString prj_path = Prj().GetProjectPath();
1137 fn.MakeAbsolute( prj_path );
1138 }
1139
1140 ERC_REPORT reportWriter( &m_parent->Schematic(), m_parent->GetUserUnits(), m_markerProvider );
1141
1142 bool success = false;
1143 if( fn.GetExt() == FILEEXT::JsonFileExtension )
1144 success = reportWriter.WriteJsonReport( fn.GetFullPath() );
1145 else
1146 success = reportWriter.WriteTextReport( fn.GetFullPath() );
1147
1148 if( success )
1149 m_messages->Report( wxString::Format( _( "Report file '%s' created." ), fn.GetFullPath() ) );
1150 else
1151 DisplayErrorMessage( this, wxString::Format( _( "Failed to create file '%s'." ), fn.GetFullPath() ) );
1152}
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
Definition bitmap.cpp:110
static TOOL_ACTION excludeMarker
Definition actions.h:129
static TOOL_ACTION selectionClear
Clear the current selection.
Definition actions.h:224
wxButton * m_saveReport
wxButton * m_sdbSizer1Cancel
wxSimplebook * m_runningResultsBook
wxCheckBox * m_showExclusions
NUMBER_BADGE * m_errorsBadge
WX_INFOBAR * m_infoBar
STD_BITMAP_BUTTON * m_bMenu
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
DIALOG_ERC_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Electrical Rules Checker"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
void OnMenu(wxCommandEvent &aEvent) override
void ExcludeMarker(SCH_MARKER *aMarker=nullptr)
Exclude aMarker from the ERC list.
void OnIgnoredItemRClick(wxListEvent &aEvent) override
const SCH_MARKER * m_centerMarkerOnIdle
Definition dialog_erc.h:119
void OnERCItemDClick(wxDataViewEvent &aEvent) override
std::shared_ptr< RC_ITEMS_PROVIDER > m_markerProvider
Definition dialog_erc.h:113
bool TransferDataToWindow() override
bool m_ercRun
Definition dialog_erc.h:117
bool m_crossprobe
Definition dialog_erc.h:121
DIALOG_ERC(SCH_EDIT_FRAME *parent)
bool m_scroll_on_crossprobe
Definition dialog_erc.h:122
void testErc()
void SelectMarker(const SCH_MARKER *aMarker)
bool updateUI() override
SCH_EDIT_FRAME * m_parent
Definition dialog_erc.h:107
wxString m_violationsTitleTemplate
Definition dialog_erc.h:110
void OnERCItemRClick(wxDataViewEvent &aEvent) override
void centerMarkerIdleHandler(wxIdleEvent &aEvent)
void OnDeleteAllClick(wxCommandEvent &event) override
void OnLinkClicked(wxHtmlLinkEvent &event) override
void OnCharHook(wxKeyEvent &aEvt) override
void OnRunERCClick(wxCommandEvent &event) override
void deleteAllMarkers(bool aIncludeExclusions)
wxString m_ignoredTitleTemplate
Definition dialog_erc.h:111
void OnDeleteOneClick(wxCommandEvent &event) override
void UpdateData()
void OnSaveReport(wxCommandEvent &aEvent) override
int getSeverities()
void PrevMarker()
void NextMarker()
SCHEMATIC * m_currentSchematic
Definition dialog_erc.h:108
void OnEditViolationSeverities(wxHyperlinkEvent &aEvent) override
void UpdateAnnotationWarning()
void redrawDrawPanel()
void Report(const wxString &aMessage) override
Display aMessage in the progress bar dialog.
void OnERCItemSelected(wxDataViewEvent &aEvent) override
RC_TREE_MODEL * m_markerTreeModel
Definition dialog_erc.h:114
void updateDisplayedCounts()
void OnSeverity(wxCommandEvent &aEvent) override
bool m_running
Definition dialog_erc.h:116
bool m_showAllErrors
Definition dialog_erc.h:123
void OnCloseErcDialog(wxCloseEvent &event) override
void OnCancelClick(wxCommandEvent &event) override
bool Show(bool show) override
void SetupStandardButtons(std::map< int, wxString > aLabels={})
bool IsQuasiModal() const
Definition dialog_shim.h:93
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
virtual void OnCharHook(wxKeyEvent &aEvt)
int ShowModal() override
static std::shared_ptr< ERC_ITEM > Create(int aErrorCode)
Constructs an ERC_ITEM for the given error code.
Definition erc_item.cpp:307
static std::vector< std::reference_wrapper< RC_ITEM > > GetItemsWithSeverities()
Definition erc_item.h:76
bool WriteJsonReport(const wxString &aFullFileName)
Writes a JSON formatted ERC Report to the given file path in the c-locale.
bool WriteTextReport(const wxString &aFullFileName)
Writes the text report also available via GetTextReport directly to a given file path.
Container for ERC settings.
SEVERITY GetSeverity(int aErrorCode) const
void SetSeverity(int aErrorCode, SEVERITY aSeverity)
void RunTests(DS_PROXY_VIEW_ITEM *aDrawingSheet, SCH_EDIT_FRAME *aEditFrame, KIFACE *aCvPcb, PROJECT *aProject, PROGRESS_REPORTER *aProgressReporter)
Definition erc.cpp:1985
A specialisation of the RC_TREE_MODEL class to enable ERC errors / warnings to be resolved in a speci...
Definition erc_item.h:38
Definition kiid.h:49
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
@ FACE_CVPCB
Definition kiway.h:303
bool IsExcluded() const
Definition marker_base.h:93
std::shared_ptr< RC_ITEM > GetRCItem() const
void SetExcluded(bool aExcluded, const wxString &aComment=wxEmptyString)
Definition marker_base.h:94
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 void AdvancePhase()=0
Use the next available virtual zone of the dialog progress bar.
virtual const wxString GetProjectPath() const
Return the full path of the project.
Definition project.cpp:168
int GetErrorCode() const
Definition rc_item.h:158
MARKER_BASE * GetParent() const
Definition rc_item.h:133
static RC_TREE_NODE * ToNode(wxDataViewItem aItem)
Definition rc_item.h:250
void ValueChanged(RC_TREE_NODE *aNode)
Definition rc_item.cpp:527
void Update(std::shared_ptr< RC_ITEMS_PROVIDER > aProvider, int aSeverities)
Definition rc_item.cpp:370
void DeleteCurrentItem(bool aDeep)
Definition rc_item.cpp:576
static KIID ToUUID(wxDataViewItem aItem)
Definition rc_item.cpp:226
std::shared_ptr< RC_ITEM > m_RcItem
Definition rc_item.h:235
NODE_TYPE m_Type
Definition rc_item.h:234
Holds all the data relating to one schematic.
Definition schematic.h:88
void RecordERCExclusions()
Scan existing markers and record data from any that are Excluded.
SCH_SHEET & Root() const
Definition schematic.h:132
ERC_SETTINGS & ErcSettings() const
static TOOL_ACTION changeSheet
Schematic editor (Eeschema) main window.
SCHEMATIC & Schematic() const
void InspectERCError(const std::shared_ptr< RC_ITEM > &aERCItem)
wxString InspectERCErrorMenuText(const std::shared_ptr< RC_ITEM > &aERCItem)
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition sch_item.h:167
wxString GetClass() const override
Return the class name.
Definition sch_item.h:177
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:747
void DeleteMarkers(enum MARKER_BASE::MARKER_T aMarkerTyp, int aErrorCode, bool aIncludeExclusions=true)
Delete all markers of a particular type and error code.
void DeleteAllMarkers(enum MARKER_BASE::MARKER_T 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)
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:867
Master controller class:
A KICAD version of wxTextEntryDialog which supports the various improvements/work-arounds from DIALOG...
wxString GetValue() const
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition confirm.cpp:202
This file is part of the common library.
#define KICAD_MESSAGE_DIALOG
Definition confirm.h:52
static bool g_lastERCRun
wxDEFINE_EVENT(EDA_EVT_CLOSE_ERC_DIALOG, wxCommandEvent)
static std::vector< std::pair< wxString, int > > g_lastERCIgnored
static SCHEMATIC * g_lastERCSchematic
#define DIALOG_ERC_WINDOW_NAME
Definition dialog_erc.h:39
#define _(s)
static int DEFAULT_SINGLE_COL_WIDTH
ERCE_T
ERC error codes.
@ ERCE_ENDPOINT_OFF_GRID
Pin or wire-end off grid.
@ ERCE_PIN_TO_PIN_WARNING
@ ERCE_PIN_TO_PIN_ERROR
static const std::string ReportFileExtension
static const std::string JsonFileExtension
static wxString JsonFileWildcard()
static wxString ReportFileWildcard()
void SetFloatLevel(wxWindow *aWindow)
Intended to set the floating window level in macOS on a window.
Definition wxgtk/ui.cpp:424
void ForceFocus(wxWindow *aWindow)
Pass the current focus to the window.
Definition wxgtk/ui.cpp:125
void AllowNetworkFileSystems(wxDialog *aDialog)
Configure a file dialog to show network and virtual file systems.
Definition wxgtk/ui.cpp:717
SEVERITY
@ RPT_SEVERITY_WARNING
@ RPT_SEVERITY_ERROR
@ RPT_SEVERITY_EXCLUSION
@ RPT_SEVERITY_IGNORE
@ RPT_SEVERITY_INFO
T * GetAppSettings(const char *aFilename)
std::vector< FAB_LAYER_COLOR > dummy
@ MD_ALT
Definition tool_event.h:145
@ MD_CTRL
Definition tool_event.h:144
@ MD_SHIFT
Definition tool_event.h:143
@ SCH_MARKER_T
Definition typeinfo.h:162
Definition of file extensions used in Kicad.