From 23b13ede2dea658b2c58adb4fb494d2da07e79dd Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Fri, 7 Aug 2009 18:30:12 +0100 Subject: [PATCH] Default handling allows editing and blocks deletes --- openlp/core/ui/thememanager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 765e25c96..e29c23d0f 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -84,7 +84,7 @@ class ThemeManager(QtGui.QWidget): def onEditTheme(self): item = self.ThemeListWidget.currentItem() if item is not None: - self.amendThemeForm.loadTheme(unicode(item.text())) + self.amendThemeForm.loadTheme(unicode(item.data(QtCore.Qt.UserRole).toString())) self.amendThemeForm.exec_() def onDeleteTheme(self): @@ -92,7 +92,8 @@ class ThemeManager(QtGui.QWidget): item = self.ThemeListWidget.currentItem() if item is not None: theme = unicode(item.text()) - if theme == self.global_theme: + # should be the same unless default + if theme != unicode(item.data(QtCore.Qt.UserRole).toString()): QtGui.QMessageBox.critical(self, translate(u'ThemeManager', u'Error'), translate(u'ThemeManager', u'You are unable to delete the default theme!'),