Fix Presentation Tag and flush Renderer cache on re-paint

bzr-revno: 714
This commit is contained in:
Tim Bentley 2010-02-23 19:50:13 +00:00
commit f2c94ca13f
3 changed files with 12 additions and 14 deletions

View File

@ -573,13 +573,15 @@ class ServiceManager(QtGui.QWidget):
self.regenerateServiceItems()
def regenerateServiceItems(self):
#force reset of renderer as theme data has changed
self.parent.RenderManager.themedata = None
if len(self.serviceItems) > 0:
tempServiceItems = self.serviceItems
self.onNewService()
for item in tempServiceItems:
self.addServiceItem(item[u'service_item'])
self.addServiceItem(item[u'service_item'], True)
def addServiceItem(self, item):
def addServiceItem(self, item, rebuild=False):
"""
Add a Service item to the list
@ -606,6 +608,9 @@ class ServiceManager(QtGui.QWidget):
u'order': len(self.serviceItems)+1,
u'expanded':True})
self.repaintServiceList(sitem + 1, 0)
#if rebuilding list make sure live is fixed.
if rebuild:
self.parent.LiveController.replaceServiceManagerItem(item)
self.parent.serviceChanged(False, self.serviceName)
def makePreview(self):

View File

@ -51,17 +51,10 @@ class PresentationTab(SettingsTab):
self.PresentationLeftLayout.setMargin(0)
self.VerseDisplayGroupBox = QtGui.QGroupBox(self)
self.VerseDisplayGroupBox.setObjectName(u'VerseDisplayGroupBox')
self.VerseDisplayLayout = QtGui.QGridLayout(self.VerseDisplayGroupBox)
self.VerseDisplayLayout = QtGui.QVBoxLayout(self.VerseDisplayGroupBox)
self.VerseDisplayLayout.setMargin(8)
self.VerseDisplayLayout.setObjectName(u'VerseDisplayLayout')
self.VerseTypeWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
self.VerseTypeWidget.setObjectName(u'VerseTypeWidget')
self.VerseTypeLayout = QtGui.QHBoxLayout(self.VerseTypeWidget)
self.VerseTypeLayout.setSpacing(8)
self.VerseTypeLayout.setMargin(0)
self.VerseTypeLayout.setObjectName(u'VerseTypeLayout')
self.PresenterCheckboxes = {}
index = 0
for key in self.controllers:
controller = self.controllers[key]
checkbox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
@ -69,8 +62,7 @@ class PresentationTab(SettingsTab):
checkbox.setEnabled(controller.available)
checkbox.setObjectName(controller.name + u'CheckBox')
self.PresenterCheckboxes[controller.name] = checkbox
index = index + 1
self.VerseDisplayLayout.addWidget(checkbox, index, 0, 1, 1)
self.VerseDisplayLayout.addWidget(checkbox)
self.PresentationThemeWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
self.PresentationThemeWidget.setObjectName(u'PresentationThemeWidget')
self.PresentationThemeLayout = QtGui.QHBoxLayout(
@ -96,6 +88,7 @@ class PresentationTab(SettingsTab):
self.PresentationLayout.addWidget(self.PresentationRightWidget)
def retranslateUi(self):
self.VerseDisplayGroupBox.setTitle(self.trUtf8('Available Controllers'))
for key in self.controllers:
controller = self.controllers[key]
checkbox = self.PresenterCheckboxes[controller.name]

View File

@ -1 +1 @@
1.9.0-712
1.9.0-713