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