From ec03f4f9da503cac25d4950fb7bc2ff224903c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 28 Sep 2013 14:57:53 +0200 Subject: [PATCH] Block button handler instead of deactivate button By deactivating the button, the button lost the focus which makes NoModal selects the wrong sensitive widget and thus the wizard behaves like if it was launched from the menu instead of from a tab. issue3353 review1083003 (transplanted from 0d135623d016ce2d8185fcb5790eb22d9d8de254) --- tryton/gui/window/view_form/view/form.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tryton/gui/window/view_form/view/form.py b/tryton/gui/window/view_form/view/form.py index 7373db20cc..a4b50243ad 100644 --- a/tryton/gui/window/view_form/view/form.py +++ b/tryton/gui/window/view_form/view/form.py @@ -184,8 +184,8 @@ class ViewForm(ParserView): self.screen.display() return else: - widget.set_sensitive(False) + widget.handler_block_by_func(self.button_clicked) try: self.screen.button(widget.attrs) finally: - widget.set_sensitive(True) + widget.handler_unblock_by_func(self.button_clicked)