5439: Wrong row when dragging upwards to move items in embedded list

svn: r18627
This commit is contained in:
Michiel Nauta 2011-12-18 10:07:22 +00:00
parent 5a84ca8606
commit a2662cecd4
4 changed files with 4 additions and 4 deletions

View File

@ -274,7 +274,7 @@ class EmbeddedList(ButtonTab):
del dlist[row_from] del dlist[row_from]
else: else:
del dlist[row_from] del dlist[row_from]
dlist.insert(row_to-1, obj) dlist.insert(row_to, obj)
self.changed = True self.changed = True
self.rebuild() self.rebuild()

View File

@ -529,7 +529,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
del dlist[row_from] del dlist[row_from]
else: else:
del dlist[row_from] del dlist[row_from]
dlist.insert(row_to-1, obj) dlist.insert(row_to, obj)
self.changed = True self.changed = True
self.rebuild() self.rebuild()

View File

@ -258,7 +258,7 @@ class GroupEmbeddedList(EmbeddedList):
del dlist[row_from[1]] del dlist[row_from[1]]
else: else:
del dlist[row_from[1]] del dlist[row_from[1]]
dlist.insert(row_to[1]-1, obj) dlist.insert(row_to[1], obj)
self.changed = True self.changed = True
self.rebuild() self.rebuild()
elif row_from[0] == self._WORKGROUP: elif row_from[0] == self._WORKGROUP:

View File

@ -173,7 +173,7 @@ class ChildEmbedList(EmbeddedList):
del dlist[row_from] del dlist[row_from]
else: else:
del dlist[row_from] del dlist[row_from]
dlist.insert(row_to-1, obj) dlist.insert(row_to, obj)
self.changed = True self.changed = True
self.rebuild() self.rebuild()