diff --git a/src/gui/editors/displaytabs/embeddedlist.py b/src/gui/editors/displaytabs/embeddedlist.py index a73757f04..28d5ebff5 100644 --- a/src/gui/editors/displaytabs/embeddedlist.py +++ b/src/gui/editors/displaytabs/embeddedlist.py @@ -272,11 +272,12 @@ class EmbeddedList(ButtonTab): if row is None: return len(self.get_data()) else: + path = row[0].get_indices() if row[1] in (Gtk.TreeViewDropPosition.BEFORE, Gtk.TreeViewDropPosition.INTO_OR_BEFORE): - return row[0][0] + return path[0] else: - return row[0][0]+1 + return path[0]+1 def _handle_drag(self, row, obj): self.get_data().insert(row, obj) diff --git a/src/gui/editors/displaytabs/groupembeddedlist.py b/src/gui/editors/displaytabs/groupembeddedlist.py index d07c4ca20..0c9a62dda 100644 --- a/src/gui/editors/displaytabs/groupembeddedlist.py +++ b/src/gui/editors/displaytabs/groupembeddedlist.py @@ -214,8 +214,9 @@ class GroupEmbeddedList(EmbeddedList): else: return [self._WORKGROUP, len(self.get_data()[self._WORKGROUP])] else: - wgroup = dest[0][0] - if len(dest[0]) == 1: + path = dest[0].get_indices() + wgroup = path[0] + if len(path) == 1: # On a heading if dest[1] == Gtk.TreeViewDropPosition.BEFORE: if wgroup != 0: @@ -229,9 +230,9 @@ class GroupEmbeddedList(EmbeddedList): else: if dest[1] in (Gtk.TreeViewDropPosition.BEFORE, Gtk.TreeViewDropPosition.INTO_OR_BEFORE): - return (wgroup, dest[0][1]) + return (wgroup, path[1]) else: - return (wgroup, dest[0][1]+1) + return (wgroup, path[1]+1) def _handle_drag(self, row, obj): """