mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 01:14:02 +08:00
Fix checking is volume svg
This commit is contained in:
parent
466ac9105e
commit
f31d7f1d8c
@ -220,7 +220,7 @@ bool GLGizmoSVG::create_volume(std::string_view svg_file, const Vec2d &mouse_pos
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool GLGizmoSVG::is_svg(const ModelVolume &volume) {
|
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) {
|
bool GLGizmoSVG::is_svg_object(const ModelVolume &volume) {
|
||||||
@ -1174,6 +1174,7 @@ void GLGizmoSVG::set_volume_by_selection()
|
|||||||
// calculate scale for height and depth inside of scaled object instance
|
// calculate scale for height and depth inside of scaled object instance
|
||||||
calculate_scale(); // must be before calculation of tesselation
|
calculate_scale(); // must be before calculation of tesselation
|
||||||
|
|
||||||
|
// checking that exist is inside of function "is_svg"
|
||||||
EmbossShape &es = *volume->emboss_shape;
|
EmbossShape &es = *volume->emboss_shape;
|
||||||
EmbossShape::SvgFile &svg_file = *es.svg_file;
|
EmbossShape::SvgFile &svg_file = *es.svg_file;
|
||||||
if (svg_file.image == nullptr) {
|
if (svg_file.image == nullptr) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user