[kupfer: 18/38] commatrick: Fix bug in commandexec for multiple action activation



commit 45f1853722fd8c0ac78cd54c24bf3285b5ea76d3
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Fri Jan 15 17:42:06 2010 +0100

    commatrick: Fix bug in commandexec for multiple action activation

 kupfer/commandexec.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/commandexec.py b/kupfer/commandexec.py
index e3939a4..9fb0fb4 100644
--- a/kupfer/commandexec.py
+++ b/kupfer/commandexec.py
@@ -36,8 +36,10 @@ def _activate_action_single(obj, action, iobj):
 def _activate_action_multiple(obj, action, iobj):
 	if not hasattr(action, "activate_multiple"):
 		ret = None
-		for leaf in _get_leaf_members(obj):
-			ret = _activate_action_single(leaf, action, iobj) or ret
+		iobjs = (None, ) if iobj is None else _get_leaf_members(iobj)
+		for L in _get_leaf_members(obj):
+			for I in iobjs:
+				ret = _activate_action_single(L, action, I) or ret
 		return ret
 
 	if action.requires_object():



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