diff options
| author | Marc Jeanmougin <mc@localhost.localdomain> | 2015-02-17 02:00:37 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <mc@localhost.localdomain> | 2015-02-17 02:00:37 +0000 |
| commit | a7f2b2ba3f13ceb60376802f4a31e104153839e8 (patch) | |
| tree | 6db393e9e5a0a9ab7916a0e7ed29d875efa39ea1 /src/file.cpp | |
| parent | device-manager: Get rid of GLists (diff) | |
| download | inkscape-a7f2b2ba3f13ceb60376802f4a31e104153839e8.tar.gz inkscape-a7f2b2ba3f13ceb60376802f4a31e104153839e8.zip | |
At first, I was thinking "I just have to go to the selection file, and change that GSList* with a std::list, then resolve the few problems"
So, i tried that.
And I will continue tomorrow, and the days after, on and on.
(bzr r13922.1.1)
Diffstat (limited to 'src/file.cpp')
| -rw-r--r-- | src/file.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/file.cpp b/src/file.cpp index 72516d776..4325c838b 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1063,7 +1063,7 @@ void sp_import_document(SPDesktop *desktop, SPDocument *clipdoc, bool in_place) desktop->doc()->importDefs(clipdoc); // copy objects - GSList *pasted_objects = NULL; + std::list<SPObject*> 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")) { @@ -1082,7 +1082,7 @@ 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_front(dynamic_cast<SPObject*>(obj_copy)); } // Change the selection to the freshly pasted objects @@ -1123,8 +1123,6 @@ void sp_import_document(SPDesktop *desktop, SPDocument *clipdoc, bool in_place) sp_selection_move_relative(selection, offset); } - - g_slist_free(pasted_objects); } |
