6577: Mulltiple drop from clipboard on embeddedlist not working

svn: r21789
This commit is contained in:
Benny Malengier 2013-03-28 16:02:18 +00:00
parent a421439a76
commit 594f273260

View File

@ -253,7 +253,13 @@ class EmbeddedList(ButtonTab):
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()) data = pickle.loads(sel_data.get_data())
if isinstance(data, list):
data = [pickle.loads(x) for x in data]
else:
data = [data]
for value in data:
(mytype, selfid, obj, row_from) = value
# 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:
@ -268,9 +274,9 @@ class EmbeddedList(ButtonTab):
self._move(row_from, row, obj) self._move(row_from, row, obj)
else: else:
self._handle_drag(row, obj) self._handle_drag(row, obj)
self.rebuild()
elif self._DND_EXTRA and mytype == self._DND_EXTRA.drag_type: elif self._DND_EXTRA and mytype == self._DND_EXTRA.drag_type:
self.handle_extra_type(mytype, obj) self.handle_extra_type(mytype, obj)
self.rebuild()
def tree_drag_motion(self, *args): def tree_drag_motion(self, *args):
""" """