From: cilix42 Date: Wed, 26 Dec 2007 01:51:37 +0000 (+0000) Subject: Fix bug #178004 [assert when saving as plain svg] X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=850cbc29823aa92a03e97caba1e3102b53d7c833;p=inkscape.git Fix bug #178004 [assert when saving as plain svg] --- diff --git a/src/persp3d.cpp b/src/persp3d.cpp index 68c27c8e2..75513b76b 100644 --- a/src/persp3d.cpp +++ b/src/persp3d.cpp @@ -241,7 +241,10 @@ persp3d_write(SPObject *object, Inkscape::XML::Node *repr, guint flags) Persp3D *persp = SP_PERSP3D(object); if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { - repr = SP_OBJECT_REPR(persp3d_create_xml_element (document)); + // this is where we end up when saving as plain SVG (also in other circumstances?); + // hence we don't set the sodipodi:type attribute + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object)); + repr = xml_doc->createElement("inkscape:perspective"); } if (flags & SP_OBJECT_WRITE_EXT) { @@ -406,9 +409,7 @@ void persp3d_add_box_transform (Persp3D *persp, SPBox3D *box) { std::map::iterator i = persp->boxes_transformed.find(box); if (i != persp->boxes_transformed.end() && (*i).second == true) { - g_print ("Warning! In %s (%d): trying to add transform status for box %d twice when it's already listed as true.\n", - SP_OBJECT_REPR(persp)->attribute("id"), persp->my_counter, - box->my_counter, persp->boxes_transformed[box]); + g_print ("Warning! In %s (%d): trying to add transform status for box %d twice when it's already listed as true.\n", SP_OBJECT_REPR(persp)->attribute("id"), persp->my_counter, box->my_counter); return; }