Fix Eagle plugin footprint QA test issue.

Apparently mapping Eagle footprint layers to the KiCad Dwg_User
that were previously mapped to UNDEFINED_LAYER breaks the QA test
and causes the footprint editor to crash when opening Eagle
footprints.  This means that the potential data loss issue when
loading Eagle footprints is still in play.
This commit is contained in:
Wayne Stambaugh 2022-08-22 09:11:14 -04:00
parent 792d7babe3
commit c72457482c
2 changed files with 4 additions and 11 deletions

View File

@ -3080,17 +3080,9 @@ std::tuple<PCB_LAYER_ID, LSET, bool> EAGLE_PLUGIN::defaultKicadLayer( int aEagle
case EAGLE_LAYER::HOLES:
default:
if( aIsLibraryCache )
{
if( aEagleLayer != EAGLE_LAYER::MILLING && aEagleLayer != EAGLE_LAYER::TTEST &&
aEagleLayer != EAGLE_LAYER::BTEST && aEagleLayer != EAGLE_LAYER::HOLES )
kiLayer = Dwgs_User;
else
kiLayer = UNDEFINED_LAYER;
}
kiLayer = UNDEFINED_LAYER;
else
{
kiLayer = UNSELECTED_LAYER;
}
break;
}

View File

@ -213,8 +213,9 @@ private:
*
* @note The Eagle MILLING, TTEST, BTEST, and HOLES layers are set to #UNDEFINED_LAYER
* for historical purposes. All other Eagle layers that do not directly map to
* KiCad layers will be set to the #Dwg_User layer when loading Eagle footprint
* libraries to prevent data loss.
* KiCad layers will be set to #UNDEFINED_LAYER when loading Eagle footprint
* libraries. This should be addressed in the future because in some cases this
* will cause data loss.
*
* @see #EAGLE_LAYER and defaultKiCadLayer().
*