summaryrefslogtreecommitdiffstats
path: root/src/file.cpp
diff options
context:
space:
mode:
authorTomasz Boczkowski <penginsbacon@gmail.com>2015-05-02 09:43:24 +0000
committerTomasz Boczkowski <penginsbacon@gmail.com>2015-05-02 09:43:24 +0000
commit4ae263b8d394775ff631efaacc835346af1ffdae (patch)
tree8c54527cb2698ade852a3286e84692fc29b74ad8 /src/file.cpp
parentmerged gtk3 compile fix (diff)
parentsp-text: Whitespace cleanup (diff)
downloadinkscape-4ae263b8d394775ff631efaacc835346af1ffdae.tar.gz
inkscape-4ae263b8d394775ff631efaacc835346af1ffdae.zip
merge with trunk
(bzr r14059.1.12)
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/file.cpp b/src/file.cpp
index f9e259fe2..d1dd2bcd6 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -1069,7 +1069,7 @@ void sp_import_document(SPDesktop *desktop, SPDocument *clipdoc, bool in_place)
desktop->doc()->importDefs(clipdoc);
// copy objects
- GSList *pasted_objects = NULL;
+ std::vector<Inkscape::XML::Node*> pasted_objects;
for (Inkscape::XML::Node *obj = root->firstChild() ; obj ; obj = obj->next()) {
// Don't copy metadata, defs, named views and internal clipboard contents to the document
if (!strcmp(obj->name(), "svg:defs")) {
@@ -1088,9 +1088,8 @@ void sp_import_document(SPDesktop *desktop, SPDocument *clipdoc, bool in_place)
target_parent->appendChild(obj_copy);
Inkscape::GC::release(obj_copy);
- pasted_objects = g_slist_prepend(pasted_objects, (gpointer) obj_copy);
+ pasted_objects.push_back(obj_copy);
}
-
// Change the selection to the freshly pasted objects
Inkscape::Selection *selection = desktop->getSelection();
selection->setReprList(pasted_objects);
@@ -1129,8 +1128,6 @@ void sp_import_document(SPDesktop *desktop, SPDocument *clipdoc, bool in_place)
sp_selection_move_relative(selection, offset);
}
-
- g_slist_free(pasted_objects);
}