Handle None current activity case
This commit is contained in:
parent
aa71d354b2
commit
57992d3fb4
@ -67,6 +67,10 @@ class MeshModel(gobject.GObject):
|
||||
|
||||
def _buddy_activity_changed_cb(self, buddy, cur_activity):
|
||||
buddy_model = self._buddies[buddy.get_name()]
|
||||
|
||||
if cur_activity == None:
|
||||
self.emit('buddy-moved', buddy_model, None)
|
||||
else:
|
||||
activity_model = self._activities[cur_activity.get_id()]
|
||||
self.emit('buddy-moved', buddy_model, activity_model)
|
||||
|
||||
|
@ -117,7 +117,7 @@ class MeshGroup(goocanvas.Group):
|
||||
self._remove_buddy(buddy_model)
|
||||
|
||||
if activity_model == None:
|
||||
self.add_buddy(buddy_model)
|
||||
self._add_alone_buddy(buddy_model)
|
||||
else:
|
||||
activity = self._activities[activity_model.get_id()]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user