From 5654c99815f7eb0218cc5e42ba4a1fd7ce55f883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Sat, 15 Mar 2014 11:18:52 +0100 Subject: [PATCH] 7510: do not drag and drop more than one data into editor tabs --- gramps/gui/editors/displaytabs/groupembeddedlist.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gramps/gui/editors/displaytabs/groupembeddedlist.py b/gramps/gui/editors/displaytabs/groupembeddedlist.py index df21cc806..5ded22067 100644 --- a/gramps/gui/editors/displaytabs/groupembeddedlist.py +++ b/gramps/gui/editors/displaytabs/groupembeddedlist.py @@ -173,7 +173,13 @@ class GroupEmbeddedList(EmbeddedList): and decide if this is a move or a reorder. """ if sel_data and sel_data.get_data(): - (mytype, selfid, obj, row_from) = pickle.loads(sel_data.get_data()) + + # make sure data = 1 row + # pickle.loads(sel_data.data)[3] = 0 + try: + (mytype, selfid, obj, row_from) = pickle.loads(sel_data.get_data()) + except ValueError: + return # make sure this is the correct DND type for this object if mytype == self._DND_TYPE.drag_type: