Skip to content

Commit

Permalink
Fix checking is volume svg
Browse files Browse the repository at this point in the history
  • Loading branch information
Jony01 authored and lukasmatena committed Dec 7, 2023
1 parent 466ac91 commit f31d7f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,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) {
Expand Down Expand Up @@ -1174,6 +1174,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) {
Expand Down

0 comments on commit f31d7f1

Please sign in to comment.