From 2455f6dabfa6395ae9fc1fc0237a12a17b128e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 15 Nov 2012 10:34:41 +0100 Subject: [PATCH] Improve test on focused widget issue2856 review585005 --- tryton/gui/window/view_form/view/form.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/view/form.py b/tryton/gui/window/view_form/view/form.py index df653171dd..c6653491ec 100644 --- a/tryton/gui/window/view_form/view/form.py +++ b/tryton/gui/window/view_form/view/form.py @@ -82,7 +82,9 @@ class ViewForm(ParserView): field = record.group.fields[name] for widget in widgets: if (not focused_widget - or widget.widget.get_focus_child()): + or widget.widget.is_focus() + or (isinstance(widget.widget, gtk.Container) + and widget.widget.get_focus_child())): widget.set_value(record, field) def sel_ids_get(self):