diff --git a/common/rc_item.cpp b/common/rc_item.cpp index b7d8f48afd..fb777a36e5 100644 --- a/common/rc_item.cpp +++ b/common/rc_item.cpp @@ -332,6 +332,7 @@ void RC_TREE_MODEL::GetValue( wxVariant& aVariant, case RPT_SEVERITY_ERROR: prefix += _( "Error: " ); break; case RPT_SEVERITY_WARNING: prefix += _( "Warning: " ); break; + case RPT_SEVERITY_EXCLUSION: case RPT_SEVERITY_UNDEFINED: case RPT_SEVERITY_INFO: case RPT_SEVERITY_ACTION: diff --git a/eeschema/dialogs/dialog_change_symbols.cpp b/eeschema/dialogs/dialog_change_symbols.cpp index 837cece526..8615ba35ca 100644 --- a/eeschema/dialogs/dialog_change_symbols.cpp +++ b/eeschema/dialogs/dialog_change_symbols.cpp @@ -237,6 +237,9 @@ void DIALOG_CHANGE_SYMBOLS::launchNewIdSymbolBrowser( wxCommandEvent& aEvent ) void DIALOG_CHANGE_SYMBOLS::updateFieldsList() { SCH_EDIT_FRAME* frame = dynamic_cast( GetParent() ); + + wxCHECK( frame, /* void */ ); + SCH_SHEET_LIST hierarchy = frame->Schematic().GetSheets(); // Load non-mandatory fields from all matching symbols and their library parts diff --git a/eeschema/schematic.cpp b/eeschema/schematic.cpp index 93a8a09be3..3f880422cd 100644 --- a/eeschema/schematic.cpp +++ b/eeschema/schematic.cpp @@ -146,9 +146,9 @@ std::vector SCHEMATIC::ResolveERCExclusions() for( SCH_ITEM* item : sheet.LastScreen()->Items().OfType( SCH_MARKER_T ) ) { SCH_MARKER* marker = static_cast( item ); - auto it = ErcSettings().m_ErcExclusions.find( marker->Serialize() ); + auto it = settings.m_ErcExclusions.find( marker->Serialize() ); - if( it != ErcSettings().m_ErcExclusions.end() ) + if( it != settings.m_ErcExclusions.end() ) { marker->SetExcluded( true ); settings.m_ErcExclusions.erase( it ); diff --git a/eeschema/tools/ee_grid_helper.cpp b/eeschema/tools/ee_grid_helper.cpp index a4e986f4f0..4546302512 100644 --- a/eeschema/tools/ee_grid_helper.cpp +++ b/eeschema/tools/ee_grid_helper.cpp @@ -314,7 +314,7 @@ VECTOR2I EE_GRID_HELPER::BestSnapAnchor( const VECTOR2I& aOrigin, int aLayer, if( m_enableGrid && std::abs( nearestGrid.y - aOrigin.y ) < snapDist.y ) { pt.y = nearestGrid.y; - snapDist.x = std::abs( nearestGrid.y - aOrigin.y ); + snapDist.y = std::abs( nearestGrid.y - aOrigin.y ); snapLineY = false; } diff --git a/pcbnew/tools/board_inspection_tool.cpp b/pcbnew/tools/board_inspection_tool.cpp index 49a9858ca8..bbe15ae086 100644 --- a/pcbnew/tools/board_inspection_tool.cpp +++ b/pcbnew/tools/board_inspection_tool.cpp @@ -115,6 +115,10 @@ int BOARD_INSPECTION_TOOL::ShowStatisticsDialog( const TOOL_EVENT& aEvent ) wxString BOARD_INSPECTION_TOOL::getItemDescription( BOARD_ITEM* aItem ) { + // Null items have no description + if( !aItem ) + return wxString(); + wxString s = aItem->GetSelectMenuText( m_frame->GetUserUnits() ); if( aItem->IsConnected() ) @@ -309,7 +313,7 @@ int BOARD_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent ) if( b->Type() == PCB_GROUP_T ) { - PCB_GROUP* bg = static_cast( a ); + PCB_GROUP* bg = static_cast( b ); if( bg->GetItems().empty() ) { @@ -317,7 +321,7 @@ int BOARD_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent ) return 0; } - a = *bg->GetItems().begin(); + b = *bg->GetItems().begin(); } if( a->Type() == PCB_TRACE_T || a->Type() == PCB_ARC_T )