From c513d975128fc331c2baeba2b9c2eae4a3321e3d Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 1 Jun 2016 17:52:46 +0200 Subject: [PATCH] Use actions instead of widgets for setting focus on board view widgets where removed on changeset 4daf166b0d41 issue5586 review22031002 --- tryton/gui/window/board.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tryton/gui/window/board.py b/tryton/gui/window/board.py index bc91bfe8e0..492023d7d4 100644 --- a/tryton/gui/window/board.py +++ b/tryton/gui/window/board.py @@ -85,9 +85,7 @@ class Board(SignalEvent, TabContent): Main.get_main().sig_win_close(widget) def set_cursor(self): - if not self.board.widgets: + if not self.board.actions: return - first_widget = self.board.widgets[0] - # only Actions are added to self.board.widgets, so no need to test - # further - first_widget.screen.set_cursor() + first_action = self.board.actions[0] + first_action.screen.set_cursor()