From 024622b0f6d9a4a60472295b3bb046a1bae1ef63 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Thu, 7 Sep 2023 03:50:00 +0300 Subject: [PATCH] SVG import: skip invisible shapes. --- common/import_gfx/svg_import_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/import_gfx/svg_import_plugin.cpp b/common/import_gfx/svg_import_plugin.cpp index 8cd1b2047a..7d95fc5845 100644 --- a/common/import_gfx/svg_import_plugin.cpp +++ b/common/import_gfx/svg_import_plugin.cpp @@ -104,6 +104,9 @@ bool SVG_IMPORT_PLUGIN::Import() for( NSVGshape* shape = m_parsedImage->shapes; shape != nullptr; shape = shape->next ) { + if( !( shape->flags & NSVG_FLAGS_VISIBLE ) ) + 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;