From bd2bdd6ad71b4bd0a86091c64193c8304aabcca9 Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Mon, 27 Nov 2023 10:43:12 +0100 Subject: [PATCH] Fix checking is volume svg (cherry picked from commit prusa3d/PrusaSlicer@f31d7f1d8c9b6d65295521bbbcbcd48c64879727) --- src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp index 806ca3f28c8..92a5e5ecd62 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp @@ -218,7 +218,7 @@ bool GLGizmoSVG::create_volume(std::string_view svg_file, const Vec2d &mouse_pos } bool GLGizmoSVG::is_svg(const ModelVolume &volume) { - return volume.emboss_shape.has_value(); + return volume.emboss_shape.has_value() && volume.emboss_shape->svg_file.has_value(); } bool GLGizmoSVG::is_svg_object(const ModelVolume &volume) { @@ -1172,6 +1172,7 @@ void GLGizmoSVG::set_volume_by_selection() // calculate scale for height and depth inside of scaled object instance calculate_scale(); // must be before calculation of tesselation + // checking that exist is inside of function "is_svg" EmbossShape &es = *volume->emboss_shape; EmbossShape::SvgFile &svg_file = *es.svg_file; if (svg_file.image == nullptr) {