From b45ebd341e2365528c19ef04aeb706c3650971bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 1 Nov 2008 14:40:03 +0100 Subject: [PATCH] Improve focus chain when there is add_remove on One2Many --- tryton/gui/window/view_form/view/form_gtk/one2many.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/view/form_gtk/one2many.py b/tryton/gui/window/view_form/view/form_gtk/one2many.py index 0e8e581236..8abdbbaf0e 100644 --- a/tryton/gui/window/view_form/view/form_gtk/one2many.py +++ b/tryton/gui/window/view_form/view/form_gtk/one2many.py @@ -134,7 +134,11 @@ def _create_menu(self, attrs): but_switch.add(img_switch) but_switch.set_relief(gtk.RELIEF_NONE) hbox.pack_start(but_switch, expand=False, fill=False) - hbox.set_focus_chain([]) + + if attrs.get('add_remove'): + hbox.set_focus_chain([self.wid_text]) + else: + hbox.set_focus_chain([]) tooltips.enable()