From 6c9378a68e4d3a37a9122e2cc68e3302701b1e8d Mon Sep 17 00:00:00 2001 From: bulia byak Date: Sun, 28 May 2006 14:38:37 +0000 Subject: break apart faster: prepend to list instead of append, add objects to selection wholesale instead of one by one (bzr r1038) --- src/path-chemistry.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/path-chemistry.cpp') diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 1cd7480aa..c11754ece 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -192,7 +192,8 @@ sp_selected_path_break_apart(void) sp_curve_unref(curve); - for (GSList *l = g_slist_reverse(list); l != NULL; l = l->next) { + GSList *reprs = NULL; + for (GSList *l = list; l != NULL; l = l->next) { curve = (SPCurve *) l->data; Inkscape::XML::Node *repr = sp_repr_new("svg:path"); @@ -212,11 +213,14 @@ sp_selected_path_break_apart(void) if (l == list) repr->setAttribute("id", id); - selection->add(repr); + reprs = g_slist_prepend (reprs, repr); Inkscape::GC::release(repr); } + selection->setReprList(reprs); + + g_slist_free(reprs); g_slist_free(list); g_free(style); -- cgit v1.2.3