Don't emit signal to change active person if that is already the active person
svn: r12498
This commit is contained in:
@@ -53,12 +53,16 @@ class DbState(Callback):
|
|||||||
Change the active person and emits a signal to notify those who
|
Change the active person and emits a signal to notify those who
|
||||||
are interested.
|
are interested.
|
||||||
"""
|
"""
|
||||||
|
previous_active_person = self.active
|
||||||
self.active = person
|
self.active = person
|
||||||
if person:
|
if person:
|
||||||
try:
|
if previous_active_person and previous_active_person.handle == person.handle:
|
||||||
self.emit('active-changed', (person.handle, ))
|
pass # don't change to same!
|
||||||
except:
|
else:
|
||||||
self.emit('active-changed', ("", ))
|
try:
|
||||||
|
self.emit('active-changed', (person.handle, ))
|
||||||
|
except:
|
||||||
|
self.emit('active-changed', ("", ))
|
||||||
|
|
||||||
def change_active_handle(self, handle):
|
def change_active_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user