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