From eb0e63b411b5f0713e73e95b9865294bd83fb646 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Thu, 16 Aug 2007 14:50:40 +0000 Subject: Remember last used style for single 3D box faces (also fixes bug with wrongly assigned faces for duplicated boxes, e.g.) (bzr r3481) --- src/box3d.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/box3d.cpp') diff --git a/src/box3d.cpp b/src/box3d.cpp index c9c03ea9c..dad0ae88c 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -514,7 +514,11 @@ sp_3dbox_link_to_existing_paths (SP3DBox *box, Inkscape::XML::Node *repr) { g_warning ("SVG representation of 3D boxes should only contain paths.\n"); continue; } - box->faces[face_id]->hook_path_to_3dbox(SP_PATH(face_object)); + // TODO: Currently we don't check whether all paths are being linked to different faces. + // This is no problem with valid SVG files. It may lead to crashes, however, + // in case a file is corrupt (e.g., two or more faces have identical descriptions). + gint id = Box3DFace::descr_to_id (i->attribute ("inkscape:box3dface")); + box->faces[id]->hook_path_to_3dbox(SP_PATH(face_object)); ++face_id; } if (face_id < 6) { -- cgit v1.2.3