forked from openlp/openlp
Fix icon update only when status changes
This commit is contained in:
parent
e3439172f8
commit
4d127cd6fa
@ -791,6 +791,9 @@ class ProjectorManager(OpenLPMixin, RegistryMixin, QtGui.QWidget, Ui_ProjectorMa
|
|||||||
message = ERROR_MSG[status] if msg is None else msg
|
message = ERROR_MSG[status] if msg is None else msg
|
||||||
log.debug('(%s) updateStatus(status=%s) message: "%s"' % (item.link.name, status_code, message))
|
log.debug('(%s) updateStatus(status=%s) message: "%s"' % (item.link.name, status_code, message))
|
||||||
if status in STATUS_ICONS:
|
if status in STATUS_ICONS:
|
||||||
|
if item.status == status:
|
||||||
|
return
|
||||||
|
item.status = status
|
||||||
item.icon = QtGui.QIcon(QtGui.QPixmap(STATUS_ICONS[status]))
|
item.icon = QtGui.QIcon(QtGui.QPixmap(STATUS_ICONS[status]))
|
||||||
if status in ERROR_STRING:
|
if status in ERROR_STRING:
|
||||||
status_code = ERROR_STRING[status]
|
status_code = ERROR_STRING[status]
|
||||||
@ -895,6 +898,7 @@ class ProjectorItem(QObject):
|
|||||||
self.projectordb_item = None
|
self.projectordb_item = None
|
||||||
self.poll_time = None
|
self.poll_time = None
|
||||||
self.socket_timeout = None
|
self.socket_timeout = None
|
||||||
|
self.status = S_NOT_CONNECTED
|
||||||
super(ProjectorItem, self).__init__()
|
super(ProjectorItem, self).__init__()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user