From 7259f95b0b212bf02dcac63d2b198b38115a2e76 Mon Sep 17 00:00:00 2001 From: Stephan Erb Date: Fri, 30 May 2008 20:16:00 +0000 Subject: [PATCH] Fix drag and drop within the same group. --- src/roster_window.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 045bbe111..ddb39e7e9 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -3671,8 +3671,9 @@ class RosterWindow: if is_big_brother: # add whole metacontact to new group self.add_contact_to_groups(c_source.jid, account, [grp_dest,]) - # remove after we have so contact is not moved in General between - self.remove_contact_from_groups(c_source.jid, account, [grp_source,]) + # remove afterwards so the contact is not moved to General in the meantime + if grp_dest != grp_source: + self.remove_contact_from_groups(c_source.jid, account, [grp_source,]) else: # Normal contact or little brother family = gajim.contacts.get_metacontacts_family(account, @@ -3697,8 +3698,9 @@ class RosterWindow: else: # Normal contact self.add_contact_to_groups(c_source.jid, account, [grp_dest,]) - # remove after we have so contact is not moved in General between - self.remove_contact_from_groups(c_source.jid, account, [grp_source,]) + # remove afterwards so the contact is not moved to General in the meantime + if grp_dest != grp_source: + self.remove_contact_from_groups(c_source.jid, account, [grp_source,]) if context.action in (gtk.gdk.ACTION_MOVE, gtk.gdk.ACTION_COPY): context.finish(True, True, etime)