From 4b9bfa18df59ad3aebed33dc14a083f854e5bacd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 Apr 2009 00:43:45 +0200 Subject: [PATCH] Don't count attachment if screen not connected to 'attachment-count' --- tryton/gui/window/view_form/screen/screen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/screen/screen.py b/tryton/gui/window/view_form/screen/screen.py index 5a8eb1ef1e..c4d01e62ba 100644 --- a/tryton/gui/window/view_form/screen/screen.py +++ b/tryton/gui/window/view_form/screen/screen.py @@ -226,7 +226,7 @@ class Screen(SignalEvent): def update_attachment(self, model): if model != self.__current_model: return False - if model: + if model and self.signal_connected('attachment-count'): attachment_count = model.get_attachment_count() self.signal('attachment-count', attachment_count) return False