Fix dragging and dropping between groups with online numbers
This commit is contained in:
parent
b1fb029e66
commit
35ea2e0c96
1 changed files with 9 additions and 3 deletions
|
@ -559,10 +559,16 @@ class chumArea(RightClickTree):
|
||||||
def dropEvent(self, event):
|
def dropEvent(self, event):
|
||||||
item = self.itemAt(event.pos())
|
item = self.itemAt(event.pos())
|
||||||
if item:
|
if item:
|
||||||
if item.text(0) == "Chums" or item.text(0) in self.groups:
|
text = str(item.text(0))
|
||||||
group = item.text(0)
|
if text.rfind(" ") != -1:
|
||||||
|
text = text[0:text.rfind(" ")]
|
||||||
|
if text == "Chums" or text in self.groups:
|
||||||
|
group = text
|
||||||
else:
|
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 = event.source().currentItem()
|
||||||
chumLabel.chum.group = group
|
chumLabel.chum.group = group
|
||||||
self.mainwindow.chumdb.setGroup(chumLabel.chum.handle, group)
|
self.mainwindow.chumdb.setGroup(chumLabel.chum.handle, group)
|
||||||
|
|
Loading…
Reference in a new issue