[gegl] gegl-xml: Fix serialization of graph nodes that are not meta-ops



commit 6a791c1f74c90c6d34e57edc32d026f3a4d244b8
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Jan 5 14:44:39 2016 +0100

    gegl-xml: Fix serialization of graph nodes that are not meta-ops
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760161

 gegl/gegl-xml.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gegl/gegl-xml.c b/gegl/gegl-xml.c
index d93ea31..ba037ae 100644
--- a/gegl/gegl-xml.c
+++ b/gegl/gegl-xml.c
@@ -27,6 +27,7 @@
 #include "gegl.h"
 #include "property-types/gegl-paramspecs.h"
 #include "gegl-instrument.h"
+#include "gegl-node-private.h"
 #include "gegl-xml.h"
 
 #ifdef G_OS_WIN32
@@ -1148,6 +1149,7 @@ gchar *
 gegl_node_to_xml (GeglNode    *gegl,
                   const gchar *path_root)
 {
+  GeglOperation *operation;
   SerializeState  ss;
 
   ss.buf         = g_string_new ("");
@@ -1156,8 +1158,9 @@ gegl_node_to_xml (GeglNode    *gegl,
   ss.clones      = g_hash_table_new (NULL, NULL);
   ss.terse       = FALSE;
 
+  operation = gegl_node_get_gegl_operation (gegl);
   /* this case is probably only for empty graphs */
-  if (!gegl_node_get_operation (gegl))
+  if (gegl->is_graph && !operation)
     gegl = gegl_node_get_output_proxy (gegl, "output");
 
   g_string_append (ss.buf, "<?xml version='1.0' encoding='UTF-8'?>\n");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]