From 5a84ca8606c6602fde42e34ba86f25409799c424 Mon Sep 17 00:00:00 2001 From: Michiel Nauta Date: Sun, 18 Dec 2011 09:50:00 +0000 Subject: [PATCH] 2863: Wrong row when dropping on embedded list; again, editfamily svn: r18624 --- src/gui/editors/editfamily.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/editors/editfamily.py b/src/gui/editors/editfamily.py index 4462f8750..38e8a16f0 100644 --- a/src/gui/editors/editfamily.py +++ b/src/gui/editors/editfamily.py @@ -151,11 +151,15 @@ class ChildEmbedList(EmbeddedList): return reflist.index(obj) 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.family.get_child_ref_list()) 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.family.get_child_ref_list().insert(row, obj)