From 97a3ebbfa4e4fdba163116f3fc4dd49aab9b6d88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 28 Apr 2010 19:51:04 +0200 Subject: [PATCH] Handle close window as cancel if there is a cancel button for issue1541 --- tryton/gui/window/win_form.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/gui/window/win_form.py b/tryton/gui/window/win_form.py index 5190a3d91a..5755a6e305 100644 --- a/tryton/gui/window/win_form.py +++ b/tryton/gui/window/win_form.py @@ -299,7 +299,7 @@ class WinForm(object): if res == gtk.RESPONSE_OK: return True - elif res == gtk.RESPONSE_CANCEL: + elif self.but_cancel: self.screen.remove(delete=True) return False