From c9bc9393d54717c3eb1b6a42beb5f4ea1f23bf6c Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 17 Sep 2010 12:41:00 +0200 Subject: [PATCH] fix a bug in ged that prevent callback to be called in the correct order. --- src/common/ged.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/ged.py b/src/common/ged.py index 485176fa2..c0a2700f6 100644 --- a/src/common/ged.py +++ b/src/common/ged.py @@ -46,6 +46,9 @@ class GlobalEventsDispatcher(object): for i, h in enumerate(handlers_list): if priority < h[0]: break + else: + # no event with smaller prio found, put it at the end + i += 1 handlers_list.insert(i, (priority, handler)) else: