From 1e09f0e8b017877afe160b859f2e8454c9c0602c 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. (cherry picked from commit c72457482cdec8f25828eab0d949abc510a87a81) --- 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 f79d201719..7ce1dfb6c3 100644 --- a/pcbnew/plugins/eagle/eagle_plugin.cpp +++ b/pcbnew/plugins/eagle/eagle_plugin.cpp @@ -3017,17 +3017,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 e244c8a1b8..2afe8c43ba 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(). *