summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e42ef93)
raw | patch | inline | side by side (parent: e42ef93)
author | cilix42 <cilix42@users.sourceforge.net> | |
Sun, 8 Jun 2008 17:08:50 +0000 (17:08 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Sun, 8 Jun 2008 17:08:50 +0000 (17:08 +0000) |
src/path-chemistry.cpp | patch | blob | history |
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index 35ba1f087b574cd521f82cabeac694d7a354413c..aac75756e305ffc7098b146b00f97a15cd9be940 100644 (file)
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
Inkscape::Selection *selection = sp_desktop_selection(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
if (g_slist_length((GSList *) selection->itemList()) < 2) {
sp_desktop_message_stack(desktop)->flash(Inkscape::WARNING_MESSAGE, _("Select <b>at least two objects</b> to combine."));
desktop->setWaitingCursor();
GSList *items = g_slist_copy((GSList *) selection->itemList());
- GSList *already_paths = NULL;
GSList *to_paths = NULL;
for (GSList *i = items; i != NULL; i = i->next) {
SPItem *item = (SPItem *) i->data;
- if (SP_IS_PATH(item))
- already_paths = g_slist_prepend(already_paths, item);
- else
+ if (!SP_IS_PATH(item))
to_paths = g_slist_prepend(to_paths, item);
}
GSList *converted = NULL;
bool did = sp_item_list_to_curves(to_paths, &items, &converted);
- items = g_slist_concat (items, converted);
+ g_slist_free(to_paths);
+ for (GSList *i = converted; i != NULL; i = i->next)
+ items = g_slist_prepend(items, doc->getObjectByRepr((Inkscape::XML::Node*)(i->data)));
items = g_slist_sort(items, (GCompareFunc) sp_item_repr_compare_position);
items = g_slist_reverse(items);