From 4d127cd6fac2c9b9bdef37369a87a9daa069534f Mon Sep 17 00:00:00 2001 From: Ken Roberts Date: Tue, 14 Oct 2014 20:34:06 -0700 Subject: [PATCH] Fix icon update only when status changes --- openlp/core/ui/projector/manager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openlp/core/ui/projector/manager.py b/openlp/core/ui/projector/manager.py index f19a5cd67..19ebdc6ab 100644 --- a/openlp/core/ui/projector/manager.py +++ b/openlp/core/ui/projector/manager.py @@ -791,6 +791,9 @@ class ProjectorManager(OpenLPMixin, RegistryMixin, QtGui.QWidget, Ui_ProjectorMa message = ERROR_MSG[status] if msg is None else msg log.debug('(%s) updateStatus(status=%s) message: "%s"' % (item.link.name, status_code, message)) if status in STATUS_ICONS: + if item.status == status: + return + item.status = status item.icon = QtGui.QIcon(QtGui.QPixmap(STATUS_ICONS[status])) if status in ERROR_STRING: status_code = ERROR_STRING[status] @@ -895,6 +898,7 @@ class ProjectorItem(QObject): self.projectordb_item = None self.poll_time = None self.socket_timeout = None + self.status = S_NOT_CONNECTED super(ProjectorItem, self).__init__()