From d199081636a5027ef43c60fd2e4415c17ea8d465 Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Thu, 21 Sep 2023 14:11:27 +0200 Subject: [PATCH] Fix changing of file --- 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 f3359f61dc..fc940beaee 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp @@ -1420,6 +1420,7 @@ void GLGizmoSVG::draw_filename(){ std::string new_path = choose_svg_file(); if (!new_path.empty()) { file_changed = true; + m_volume_shape.svg_file = {}; // clear data m_volume_shape.svg_file.path = new_path; } } else if (ImGui::IsItemHovered()) { @@ -1528,7 +1529,7 @@ void GLGizmoSVG::draw_filename(){ float scale = get_scale_for_tolerance(); double tes_tol = get_tesselation_tolerance(scale); EmbossShape es_ = select_shape(m_volume_shape.svg_file.path, tes_tol); - m_volume_shape.svg_file.image = std::move(es_.svg_file.image); + m_volume_shape.svg_file = std::move(es_.svg_file); m_volume_shape.shapes_with_ids = std::move(es_.shapes_with_ids); m_shape_warnings = create_shape_warnings(*m_volume_shape.svg_file.image, scale); init_texture(m_texture, m_volume_shape.shapes_with_ids, m_gui_cfg->texture_max_size_px);