diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2007-08-16 14:50:40 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2007-08-16 14:50:40 +0000 |
| commit | eb0e63b411b5f0713e73e95b9865294bd83fb646 (patch) | |
| tree | 97773c5edb1f092ab1b3114e67005f7e9e9f987d /src/box3d.cpp | |
| parent | Don't use lowercase keyboard shortcuts in 3D box tool (diff) | |
| download | inkscape-eb0e63b411b5f0713e73e95b9865294bd83fb646.tar.gz inkscape-eb0e63b411b5f0713e73e95b9865294bd83fb646.zip | |
Remember last used style for single 3D box faces (also fixes bug with wrongly assigned faces for duplicated boxes, e.g.)
(bzr r3481)
Diffstat (limited to 'src/box3d.cpp')
| -rw-r--r-- | src/box3d.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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) { |
