Browse Source

CADSTAR PCB Archive Importer: Fix unhandled case statements

Note: UNITS::DESIGN refer to the units defined in Assignments.Technology.Units
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5725
6.0.7
Roberto Fernandez Bautista 5 years ago
committed by Jon Evans
parent
commit
dcf69d53f0
  1. 10
      pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp
  2. 2
      pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.cpp

10
pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp

@ -946,6 +946,11 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadDimensions()
dimension->Text().SetTextSize( wxSize(
getKiCadLength( dimText.Width ), getKiCadLength( dimText.Height ) ) );
if( csDim.LinearUnits == UNITS::DESIGN )
{
csDim.LinearUnits = Assignments.Technology.Units;
}
switch( csDim.LinearUnits )
{
case UNITS::METER:
@ -962,6 +967,11 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadDimensions()
case UNITS::THOU:
dimension->SetUnits( EDA_UNITS::MILS );
break;
case UNITS::DESIGN:
wxASSERT( false ); // Should not be here
break;
}
}
continue;

2
pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.cpp

@ -684,6 +684,8 @@ void CADSTAR_PCB_ARCHIVE_PARSER::PAD_SHAPE::Parse( XNODE* aNode )
LeftLength = GetXmlAttributeIDLong( aNode, 1 );
KI_FALLTHROUGH;
case PAD_SHAPE_TYPE::DIAMOND:
case PAD_SHAPE_TYPE::OCTAGON:
case PAD_SHAPE_TYPE::SQUARE:
if( aNode->GetChildren() )

Loading…
Cancel
Save