diff --git a/system/project.py b/system/project.py index 2d707b4..5fa7f99 100644 --- a/system/project.py +++ b/system/project.py @@ -48,22 +48,25 @@ class Project: def get_data_iter(self, obj): """Retuns an iterator to data.""" retval = [None] + if obj: + # add data below first function data input + obj=obj[0] + def is_obj(m, p, i, d): if obj == m.get_value(i, 2): d.append(i) return True - + self.data_tree.foreach(is_obj, retval) return retval[-1] - def add_data(self, parent, data, fun='Function'): + def add_data(self, parents, data, fun='Function'): """Adds a set of data and plots to the navigator. This method is usually called after a Function in a workflow has finished and returns its output.""" - parent_iter = self.get_data_iter(parent) - + parent_iter = self.get_data_iter(parents) it = self.data_tree_insert(parent_iter, fun, None, "grey","black") for d in data: