diff --git a/tryton/common/button.py b/tryton/common/button.py index 2adae35ba6..5a695e8cc3 100644 --- a/tryton/common/button.py +++ b/tryton/common/button.py @@ -17,6 +17,11 @@ class Button(gtk.Button): self._set_icon(attrs.get('icon')) def _set_icon(self, stock): + image = self.get_image() + if not image and not stock: + return + elif image and image.get_stock()[0] == stock: + return if not stock: self.set_image(gtk.Image()) return