From c72457482cdec8f25828eab0d949abc510a87a81 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Mon, 22 Aug 2022 09:11:14 -0400 Subject: [PATCH] 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. --- pcbnew/plugins/eagle/eagle_plugin.cpp | 10 +--------- pcbnew/plugins/eagle/eagle_plugin.h | 5 +++-- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/pcbnew/plugins/eagle/eagle_plugin.cpp b/pcbnew/plugins/eagle/eagle_plugin.cpp index d88736ad91..4f4ab031a0 100644 --- a/pcbnew/plugins/eagle/eagle_plugin.cpp +++ b/pcbnew/plugins/eagle/eagle_plugin.cpp @@ -3080,17 +3080,9 @@ std::tuple 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; } diff --git a/pcbnew/plugins/eagle/eagle_plugin.h b/pcbnew/plugins/eagle/eagle_plugin.h index fc5a87b26d..e4797f7061 100644 --- a/pcbnew/plugins/eagle/eagle_plugin.h +++ b/pcbnew/plugins/eagle/eagle_plugin.h @@ -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(). *