Fix drag and drop on empty list for issue748
This commit is contained in:
1 parent
329a8bc875
commit
7eeeda9e09
1 file changed
+4
@@ -328,6 +328,8 @@ class ViewList(ParserView):
|
||||
data = []
|
||||
treeselection = treeview.get_selection()
|
||||
treeselection.selected_foreach(_func_sel_get, data)
|
||||
if not data:
|
||||
return
|
||||
data = str(data[0])
|
||||
selection.set(selection.target, 8, data)
|
||||
|
||||
@@ -339,6 +341,8 @@ class ViewList(ParserView):
|
||||
if model[treeview.sequence].get_state_attrs(
|
||||
model).get('readonly', False):
|
||||
return
|
||||
if not selection.data:
|
||||
return
|
||||
model = treeview.get_model()
|
||||
data = eval(selection.data)
|
||||
drop_info = treeview.get_dest_row_at_pos(x, y)
|
||||
|
||||
Reference in new issue
Block a user