Read the background color setting outside of the loop

This commit is contained in:
Arjan Schrijver 2013-01-10 13:05:33 +01:00
parent 8b01158856
commit 7e2e72b4a6

View File

@ -336,10 +336,10 @@ class ServiceItem(object):
for slide in serviceitem[u'serviceitem'][u'data']: for slide in serviceitem[u'serviceitem'][u'data']:
self._raw_frames.append(slide) self._raw_frames.append(slide)
elif self.service_item_type == ServiceItemType.Image: elif self.service_item_type == ServiceItemType.Image:
settingsSection = serviceitem[u'serviceitem'][u'header'][u'name']
background = QtGui.QColor(Settings().value(settingsSection
+ u'/background color', QtCore.QVariant(u'#000000')))
for text_image in serviceitem[u'serviceitem'][u'data']: for text_image in serviceitem[u'serviceitem'][u'data']:
settingsSection = serviceitem[u'serviceitem'][u'header'][u'name']
background = QtGui.QColor(Settings().value(settingsSection
+ u'/background color', QtCore.QVariant(u'#000000')))
filename = os.path.join(path, text_image) filename = os.path.join(path, text_image)
self.add_from_image(filename, text_image, background) self.add_from_image(filename, text_image, background)
elif self.service_item_type == ServiceItemType.Command: elif self.service_item_type == ServiceItemType.Command: