7510: do not drag and drop more than one data into editor tabs

This commit is contained in:
Jérôme Rapinat 2014-03-15 11:18:52 +01:00
parent 6d8679df2d
commit 5654c99815

View File

@ -173,7 +173,13 @@ class GroupEmbeddedList(EmbeddedList):
and decide if this is a move or a reorder. and decide if this is a move or a reorder.
""" """
if sel_data and sel_data.get_data(): 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 # make sure this is the correct DND type for this object
if mytype == self._DND_TYPE.drag_type: if mytype == self._DND_TYPE.drag_type: