From 3bf9df347bce779800a85f8b60dcb23b69f9a38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 16 Apr 2014 14:27:42 +0200 Subject: [PATCH] Prevent D&D if the treeview is editing issue3753 review4861002 --- tryton/gui/window/view_form/view/list.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tryton/gui/window/view_form/view/list.py b/tryton/gui/window/view_form/view/list.py index aba22c8df0..177a94597f 100644 --- a/tryton/gui/window/view_form/view/list.py +++ b/tryton/gui/window/view_form/view/list.py @@ -550,6 +550,15 @@ class ViewList(ParserView): return if not selection.data: return + + # Don't received if the treeview was editing because it breaks the + # internal state of the cursor. + cursor, column = treeview.get_cursor() + if column: + for renderer in column.get_cell_renderers(): + if renderer.props.editing: + return + store = treeview.get_model() try: data = json.loads(selection.data)