forked from openlp/openlp
- fixed a traceback when pressing the delete button in the theme manager when no theme has been selected
- fixed the delete button being hidden/visible although a theme was selected (using the down/up keys) bzr-revno: 1515
This commit is contained in:
commit
f2ee6ae8eb
@ -127,8 +127,8 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
QtCore.QObject.connect(self.themeListWidget,
|
QtCore.QObject.connect(self.themeListWidget,
|
||||||
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
|
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
|
||||||
self.changeGlobalFromScreen)
|
self.changeGlobalFromScreen)
|
||||||
QtCore.QObject.connect(self.themeListWidget,
|
QtCore.QObject.connect(self.themeListWidget, QtCore.SIGNAL(
|
||||||
QtCore.SIGNAL(u'itemClicked(QListWidgetItem *)'),
|
u'currentItemChanged(QListWidgetItem *, QListWidgetItem *)'),
|
||||||
self.checkListState)
|
self.checkListState)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'theme_update_global'), self.changeGlobalFromTab)
|
QtCore.SIGNAL(u'theme_update_global'), self.changeGlobalFromTab)
|
||||||
@ -170,6 +170,8 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
If Default theme selected remove delete button.
|
If Default theme selected remove delete button.
|
||||||
"""
|
"""
|
||||||
|
if item is None:
|
||||||
|
return
|
||||||
realThemeName = unicode(item.data(QtCore.Qt.UserRole).toString())
|
realThemeName = unicode(item.data(QtCore.Qt.UserRole).toString())
|
||||||
themeName = unicode(item.text())
|
themeName = unicode(item.text())
|
||||||
# If default theme restrict actions
|
# If default theme restrict actions
|
||||||
@ -748,7 +750,8 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
'Theme %s is used in the %s plugin.')) % \
|
'Theme %s is used in the %s plugin.')) % \
|
||||||
(theme, plugin.name))
|
(theme, plugin.name))
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def _migrateVersion122(self, xml_data):
|
def _migrateVersion122(self, xml_data):
|
||||||
"""
|
"""
|
||||||
@ -807,3 +810,4 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
newtheme.display_horizontal_align = theme.HorizontalAlign
|
newtheme.display_horizontal_align = theme.HorizontalAlign
|
||||||
newtheme.display_vertical_align = vAlignCorrection
|
newtheme.display_vertical_align = vAlignCorrection
|
||||||
return newtheme.extract_xml()
|
return newtheme.extract_xml()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user