From 35ea2e0c96ec406d25974a4e2e8ed0f586951681 Mon Sep 17 00:00:00 2001 From: Kiooeht Date: Fri, 8 Apr 2011 01:35:28 -0700 Subject: [PATCH] Fix dragging and dropping between groups with online numbers --- pesterchum.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pesterchum.py b/pesterchum.py index d5d77c9..d6a54f7 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -559,10 +559,16 @@ class chumArea(RightClickTree): def dropEvent(self, event): item = self.itemAt(event.pos()) if item: - if item.text(0) == "Chums" or item.text(0) in self.groups: - group = item.text(0) + text = str(item.text(0)) + if text.rfind(" ") != -1: + text = text[0:text.rfind(" ")] + if text == "Chums" or text in self.groups: + group = text else: - group = item.parent().text(0) + ptext = str(item.parent().text(0)) + if ptext.rfind(" ") != -1: + ptext = ptext[0:ptext.rfind(" ")] + group = ptext chumLabel = event.source().currentItem() chumLabel.chum.group = group self.mainwindow.chumdb.setGroup(chumLabel.chum.handle, group)