From 0ff255eadc2351a1ebf01c59b0152d8b94210d72 Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Mon, 15 Jan 2024 15:05:40 +0100 Subject: [PATCH] Initialize SvgFile object in optional different way. --- src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp index 2d08f9d7eba..106684fdfcd 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp @@ -1490,8 +1490,9 @@ 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; + EmbossShape::SvgFile svg_file_new; + svg_file_new.path = new_path; + m_volume_shape.svg_file = svg_file_new; // clear data } } else if (ImGui::IsItemHovered()) { ImGui::SetTooltip("%s", _u8L("Change to another .svg file").c_str());