From 338778d7b14dc423cc0822778c9a461fe52819da Mon Sep 17 00:00:00 2001 From: reidarst Date: Wed, 3 May 2006 14:47:55 +0000 Subject: [PATCH] Functions which doesn't require inputs will now run with data selected --- system/workflow.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/workflow.py b/system/workflow.py index 37f3182..d406007 100644 --- a/system/workflow.py +++ b/system/workflow.py @@ -177,10 +177,11 @@ class WorkflowView (gtk.VBox): argcount =function.run.func_code.co_argcount - 1 - if argcount != len(parent_data): + if argcount != len(parent_data) and argcount != 0: logger.log('warning','Method requires ' + str(argcount) + ' Data. ' + str(len(parent_data)) + ' selected') return - if not project.current_data: + + if not project.current_data or argcount == 0: new_data = function.run() else: new_data = function.run(*project.current_data)