From f18040a0d0a2546784e0a22abe8764915124b696 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Thu, 30 Apr 2009 04:40:20 +0000 Subject: [PATCH] Don't emit signal to change active person if that is already the active person svn: r12498 --- src/DbState.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/DbState.py b/src/DbState.py index e4102697c..be24371cb 100644 --- a/src/DbState.py +++ b/src/DbState.py @@ -53,12 +53,16 @@ class DbState(Callback): Change the active person and emits a signal to notify those who are interested. """ + previous_active_person = self.active self.active = person if person: - try: - self.emit('active-changed', (person.handle, )) - except: - self.emit('active-changed', ("", )) + if previous_active_person and previous_active_person.handle == person.handle: + pass # don't change to same! + else: + try: + self.emit('active-changed', (person.handle, )) + except: + self.emit('active-changed', ("", )) def change_active_handle(self, handle): """