prevent TB when we move a contact that was in no group

This commit is contained in:
Yann Leboulanger 2006-01-04 12:52:26 +00:00
parent 8e3d85c746
commit edaa70740e
1 changed files with 3 additions and 1 deletions

View File

@ -2503,7 +2503,9 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
# user1.groups # user1.groups
c = gajim.contacts.get_first_contact_from_jid(account, data) c = gajim.contacts.get_first_contact_from_jid(account, data)
if context.action != gtk.gdk.ACTION_COPY: if context.action != gtk.gdk.ACTION_COPY:
c.groups.remove(grp_source) if grp_source in c.groups:
# Make sure contact was in a group
c.groups.remove(grp_source)
if model.iter_n_children(iter_group_source) == 1: if model.iter_n_children(iter_group_source) == 1:
# this was the only child # this was the only child
model.remove(iter_group_source) model.remove(iter_group_source)