changeset 1527:e05ee730df6b trunk

[svn] - possible tweak to make loading work?
author nenolod
date Mon, 07 Aug 2006 23:16:21 -0700
parents 98a9c54459f0
children 31865cb4e7b6
files ChangeLog Plugins/Visualization/paranormal/pn/pnvis.c
diffstat 2 files changed, 21 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Aug 07 23:08:59 2006 -0700
+++ b/ChangeLog	Mon Aug 07 23:16:21 2006 -0700
@@ -1,3 +1,12 @@
+2006-08-08 06:08:59 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [1966]
+  - a minor tweak to the save function
+  
+
+  Changes:        Modified:
+  +1 -1           trunk/Plugins/Visualization/paranormal/pn/pnvis.c  
+
+
 2006-08-08 05:58:22 +0000  William Pitcock <nenolod@nenolod.net>
   revision [1964]
   - locking the mutex on audacious data upload is unnecessary.
--- a/Plugins/Visualization/paranormal/pn/pnvis.c	Mon Aug 07 23:08:59 2006 -0700
+++ b/Plugins/Visualization/paranormal/pn/pnvis.c	Mon Aug 07 23:16:21 2006 -0700
@@ -155,8 +155,8 @@
 pn_vis_load_thyself (PnUserObject *user_object, const xmlNodePtr node)
 {
   PnVis *vis;
-  xmlNodePtr actuators_node, actuator_node;
-  PnActuator *root_actuator;
+  xmlNodePtr actuators_node, actuator_node, tptr;
+  PnActuator *root_actuator = NULL;
 
   g_return_if_fail (user_object != NULL);
   g_return_if_fail (PN_IS_VIS (user_object));
@@ -179,9 +179,16 @@
   if (! actuator_node)
     goto done;
 
-  /* Create a new actuator */
-  root_actuator = pn_actuator_factory_new_actuator_from_xml (actuator_node);
-  if (! root_actuator)
+  /* Create a new actuator (reworked by nenolod) */
+  for (tptr = actuator_node; tptr != NULL && root_actuator == NULL; tptr = tptr->next)
+  {
+     xmlNodePtr ttptr;
+
+     for (ttptr = tptr; ttptr != NULL; ttptr = ttptr->xmlChildrenNode)
+        root_actuator = pn_actuator_factory_new_actuator_from_xml (ttptr);
+  }
+
+  if (!root_actuator)
     pn_error ("Unknown actuator \"%s\"", actuator_node->name);
 
   pn_vis_set_root_actuator (vis, root_actuator);