changeset c3d403305e97 in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset;node=c3d403305e97
description:
Update selection to the dropped record
After drag&drop, the treeview keeps the selection at the path where the
drag&drop started. But as the current_record is not changed, this
creates an
inconsistant display. So we ensure that the dropped record is selected
at the
end.
issue8192
review267371002
diffstat:
tryton/gui/window/view_form/view/list.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (13 lines):
diff -r b451bf2ca994 -r c3d403305e97 tryton/gui/window/view_form/view/list.py
--- a/tryton/gui/window/view_form/view/list.py Fri May 03 17:58:42 2019 +0200
+++ b/tryton/gui/window/view_form/view/list.py Sun May 05 19:32:24 2019 +0200
@@ -793,6 +793,9 @@
else:
model.move_after(record, (len(model) - 1,))
Gdk.drop_finish(context, False, etime)
+ selection = self.treeview.get_selection()
+ selection.unselect_all()
+ selection.select_path(record.get_index_path(model.group))
if self.attributes.get('sequence'):
record.group.set_sequence(field=self.attributes['sequence'])
return True