summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 39568b3)
raw | patch | inline | side by side (parent: 39568b3)
author | cilix42 <cilix42@users.sourceforge.net> | |
Sat, 29 Mar 2008 22:17:45 +0000 (22:17 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Sat, 29 Mar 2008 22:17:45 +0000 (22:17 +0000) |
src/box3d.cpp | patch | blob | history | |
src/box3d.h | patch | blob | history | |
src/path-chemistry.cpp | patch | blob | history | |
src/sp-item-group.cpp | patch | blob | history |
diff --git a/src/box3d.cpp b/src/box3d.cpp
index f5745210171ed19dc8d9c940177817d4b7f51559..d7ec7ef073c0de72cd06bda12f65697b3a5d1f5e 100644 (file)
--- a/src/box3d.cpp
+++ b/src/box3d.cpp
@@ -1361,7 +1361,7 @@ box3d_switch_perspectives(SPBox3D *box, Persp3D *old_persp, Persp3D *new_persp,
/* Converts the 3D box to an ordinary SPGroup, adds it to the XML tree at the same position as
the original box and deletes the latter */
-Inkscape::XML::Node *
+SPGroup *
box3d_convert_to_group(SPBox3D *box) {
SPDocument *doc = SP_OBJECT_DOCUMENT(box);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
grepr->setAttribute("id", id);
- return grepr;
+ return SP_GROUP(doc->getObjectByRepr(grepr));
}
static inline void
diff --git a/src/box3d.h b/src/box3d.h
index bc88e6257931375ae667bf50abd4fe96c7ba0ee9..95327567960affc690885061ee79b1fb3d1949f1 100644 (file)
--- a/src/box3d.h
+++ b/src/box3d.h
Persp3D *box3d_get_perspective(SPBox3D const *box);
void box3d_switch_perspectives(SPBox3D *box, Persp3D *old_persp, Persp3D *new_persp, bool recompute_corners = false);
-Inkscape::XML::Node *box3d_convert_to_group(SPBox3D *box);
+SPGroup *box3d_convert_to_group(SPBox3D *box);
#endif /* __SP_BOX3D_H__ */
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index cfdbc0b54d276472e500be1762e1ffb3e6047da8..a08b6feb5235115b5ea5b0a64af91afbc5011ddb 100644 (file)
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
@@ -332,7 +332,7 @@ sp_item_list_to_curves(const GSList *items, GSList **selected, GSList **to_selec
if (SP_IS_BOX3D(item)) {
// convert 3D box to ordinary group of paths; replace the old element in 'selected' with the new group
- Inkscape::XML::Node *repr = box3d_convert_to_group(SP_BOX3D(item));
+ Inkscape::XML::Node *repr = SP_OBJECT_REPR(box3d_convert_to_group(SP_BOX3D(item)));
if (repr) {
*to_select = g_slist_prepend (*to_select, repr);
diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp
index cd74f88b8f36a41794b7e81d51168a467f7e3112..6ec5256eecba218495c671843454d2622ef122b1 100644 (file)
--- a/src/sp-item-group.cpp
+++ b/src/sp-item-group.cpp
SPItem *pitem = SP_ITEM (SP_OBJECT_PARENT (gitem));
Inkscape::XML::Node *prepr = SP_OBJECT_REPR (pitem);
- if (SP_IS_BOX3D(gitem)) {
- grepr = box3d_convert_to_group(SP_BOX3D(gitem));
- if (grepr) {
- gitem = SP_ITEM(doc->getObjectByRepr(grepr));
- group = SP_GROUP(gitem);
- }
- }
+ if (SP_IS_BOX3D(gitem)) {
+ group = box3d_convert_to_group(SP_BOX3D(gitem));
+ gitem = SP_ITEM(group);
+ }
- sp_lpe_item_remove_path_effect(SP_LPE_ITEM(group), false);
+ sp_lpe_item_remove_path_effect(SP_LPE_ITEM(group), false);
/* Step 1 - generate lists of children objects */
GSList *items = NULL;