changeset f9948ba02d04 in tryton:4.4
details: https://hg.tryton.org/tryton?cmd=changeset;node=f9948ba02d04
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
(grafted from c3d403305e97551e8a7df465c18d31547abce081)
diffstat:
tryton/gui/window/view_form/view/list.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (13 lines):
diff -r 6614d0a5fbe4 -r f9948ba02d04 tryton/gui/window/view_form/view/list.py
--- a/tryton/gui/window/view_form/view/list.py Thu May 02 12:46:37 2019 +0200
+++ b/tryton/gui/window/view_form/view/list.py Sun May 05 19:32:24 2019 +0200
@@ -833,6 +833,9 @@
gtk.gdk.drop_finish(context, False, etime)
else:
context.drop_finish(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