From 6db0004c81d26bbadd73b5646cd2f871ef2a99bc Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Thu, 20 Aug 2009 12:44:29 +0000 Subject: [PATCH] 2863: Wrong row when dropping on embedded list svn: r13090 --- src/DisplayTabs/_EmbeddedList.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/DisplayTabs/_EmbeddedList.py b/src/DisplayTabs/_EmbeddedList.py index f0d2c9faa..c37a910f1 100644 --- a/src/DisplayTabs/_EmbeddedList.py +++ b/src/DisplayTabs/_EmbeddedList.py @@ -250,11 +250,15 @@ class EmbeddedList(ButtonTab): pass def _find_row(self, x, y): - row = self.tree.get_path_at_pos(x, y) + row = self.tree.get_dest_row_at_pos(x, y) if row is None: return len(self.get_data()) else: - return row[0][0] + if row[1] in (gtk.TREE_VIEW_DROP_BEFORE, + gtk.TREE_VIEW_DROP_INTO_OR_BEFORE): + return row[0][0] + else: + return row[0][0]+1 def _handle_drag(self, row, obj): self.get_data().insert(row, obj)