Commit 38f16951 authored by Jayanth Ramalingaiah's avatar Jayanth Ramalingaiah Committed by Patrick Storz

Remove temporary templateinfo nodes from current document when saving as template (!2078)

Fixes #1586


(cherry picked from commit e5a4e3ec)
parent 66753a47
Pipeline #155356616 failed with stages
in 89 minutes and 57 seconds
......@@ -904,14 +904,9 @@ sp_file_save_template(Gtk::Window &parentWindow, Glib::ustring name,
Inkscape::Extension::FILE_SAVE_METHOD_INKSCAPE_SVG);
}
}
auto nodeToRemove = sp_repr_lookup_name(root, "inkscape:_templateinfo");
if (nodeToRemove != nullptr){
sp_repr_unparent(nodeToRemove);
delete nodeToRemove;
}
// remove this node from current document after saving it as template
root->removeChild(templateinfo_node);
DocumentUndo::setUndoSensitive(document, true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment