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
This commit is contained in:
Cédric Krier committed 2013-09-28 14:57:53 +02:00
1 parent 55d72d1cae
commit ee9cde3b7d
1 file changed
+2 -2
+2 -2
View File
@@ -178,8 +178,8 @@ class ViewForm(ParserView):
self.screen.display(set_cursor=True)
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)