diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2010-04-06 14:11:54 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2010-04-06 14:11:54 +0000 |
| commit | 95a0c8412e84f5e0cc1d9a63fce2be75f9fa517e (patch) | |
| tree | 12ea4d0d88ad2a94be630f6634aef3b88460748f /src/sp-object-repr.cpp | |
| parent | Fixed use of dialogs in more than one window, and tile problem with selection... (diff) | |
| download | inkscape-95a0c8412e84f5e0cc1d9a63fce2be75f9fa517e.tar.gz inkscape-95a0c8412e84f5e0cc1d9a63fce2be75f9fa517e.zip | |
Revert the inverted coordinate system fix. 3D Boxes and guides
require an XML-level backwards compatibility mechanism to fix properly,
and it's too late in the 0.48 cycle to introduce it.
(bzr r9298)
Diffstat (limited to 'src/sp-object-repr.cpp')
| -rw-r--r-- | src/sp-object-repr.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/sp-object-repr.cpp b/src/sp-object-repr.cpp index e32819746..62143e3ab 100644 --- a/src/sp-object-repr.cpp +++ b/src/sp-object-repr.cpp @@ -91,9 +91,9 @@ static unsigned const N_NAME_TYPES = SODIPODI_TYPE + 1; static GType name_to_gtype(NameType name_type, gchar const *name); /** - * Construct an SPRoot and all its descendents from the given XML representation. + * Construct an SPRoot and all its descendents from the given repr. */ -void +SPObject * sp_object_repr_build_tree(SPDocument *document, Inkscape::XML::Node *repr) { g_assert(document != NULL); @@ -103,14 +103,13 @@ sp_object_repr_build_tree(SPDocument *document, Inkscape::XML::Node *repr) g_assert(name != NULL); GType const type = name_to_gtype(REPR_NAME, name); g_assert(g_type_is_a(type, SP_TYPE_ROOT)); + gpointer newobj = g_object_new(type, 0); + g_assert(newobj != NULL); + SPObject *const object = SP_OBJECT(newobj); + g_assert(object != NULL); + sp_object_invoke_build(object, document, repr, FALSE); - // create and assign root - SPObject *root = SP_OBJECT(g_object_new(type, 0)); - g_assert(root != NULL); - document->root = root; - - // recursively create SP tree elements - sp_object_invoke_build(root, document, repr, FALSE); + return object; } GType |
