From 19753719cb8fe331760ffb706ff6cb84ec5aab7e Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Fri, 8 Sep 2023 14:45:32 +0300 Subject: [PATCH] SVG import: skip shapes that are not stroked and not filled. (cherry picked from commit bc846f5fca8404b08ece2ce404e1e7031e306ada) --- pcbnew/import_gfx/svg_import_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/import_gfx/svg_import_plugin.cpp b/pcbnew/import_gfx/svg_import_plugin.cpp index 8398f2c545..3415e34906 100644 --- a/pcbnew/import_gfx/svg_import_plugin.cpp +++ b/pcbnew/import_gfx/svg_import_plugin.cpp @@ -84,6 +84,9 @@ bool SVG_IMPORT_PLUGIN::Import() if( !( shape->flags & NSVG_FLAGS_VISIBLE ) ) continue; + if( shape->stroke.type == NSVG_PAINT_NONE && shape->fill.type == NSVG_PAINT_NONE ) + continue; + double lineWidth = shape->stroke.type != NSVG_PAINT_NONE ? shape->strokeWidth : -1; bool filled = shape->fill.type != NSVG_PAINT_NONE && alpha( shape->fill.color ) > 0;