From a2662cecd455829fbcdd742ca336db1e4d55038e Mon Sep 17 00:00:00 2001 From: Michiel Nauta Date: Sun, 18 Dec 2011 10:07:22 +0000 Subject: [PATCH] 5439: Wrong row when dragging upwards to move items in embedded list svn: r18627 --- src/gui/editors/displaytabs/embeddedlist.py | 2 +- src/gui/editors/displaytabs/gallerytab.py | 2 +- src/gui/editors/displaytabs/groupembeddedlist.py | 2 +- src/gui/editors/editfamily.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/editors/displaytabs/embeddedlist.py b/src/gui/editors/displaytabs/embeddedlist.py index 1451ae5d6..f6fd70c79 100644 --- a/src/gui/editors/displaytabs/embeddedlist.py +++ b/src/gui/editors/displaytabs/embeddedlist.py @@ -274,7 +274,7 @@ class EmbeddedList(ButtonTab): del dlist[row_from] else: del dlist[row_from] - dlist.insert(row_to-1, obj) + dlist.insert(row_to, obj) self.changed = True self.rebuild() diff --git a/src/gui/editors/displaytabs/gallerytab.py b/src/gui/editors/displaytabs/gallerytab.py index 43e1079e2..ee9529a85 100644 --- a/src/gui/editors/displaytabs/gallerytab.py +++ b/src/gui/editors/displaytabs/gallerytab.py @@ -529,7 +529,7 @@ class GalleryTab(ButtonTab, DbGUIElement): del dlist[row_from] else: del dlist[row_from] - dlist.insert(row_to-1, obj) + dlist.insert(row_to, obj) self.changed = True self.rebuild() diff --git a/src/gui/editors/displaytabs/groupembeddedlist.py b/src/gui/editors/displaytabs/groupembeddedlist.py index 4a23074b7..d3e7c9f15 100644 --- a/src/gui/editors/displaytabs/groupembeddedlist.py +++ b/src/gui/editors/displaytabs/groupembeddedlist.py @@ -258,7 +258,7 @@ class GroupEmbeddedList(EmbeddedList): del dlist[row_from[1]] else: del dlist[row_from[1]] - dlist.insert(row_to[1]-1, obj) + dlist.insert(row_to[1], obj) self.changed = True self.rebuild() elif row_from[0] == self._WORKGROUP: diff --git a/src/gui/editors/editfamily.py b/src/gui/editors/editfamily.py index 38e8a16f0..dc551821a 100644 --- a/src/gui/editors/editfamily.py +++ b/src/gui/editors/editfamily.py @@ -173,7 +173,7 @@ class ChildEmbedList(EmbeddedList): del dlist[row_from] else: del dlist[row_from] - dlist.insert(row_to-1, obj) + dlist.insert(row_to, obj) self.changed = True self.rebuild()