forked from openlp/openlp
Do not rename when name has not changed
This commit is contained in:
parent
5bb55fb63e
commit
db025be243
@ -605,19 +605,21 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
if newThemeIndex != -1:
|
if newThemeIndex != -1:
|
||||||
self.serviceComboBox.setCurrentIndex(newThemeIndex)
|
self.serviceComboBox.setCurrentIndex(newThemeIndex)
|
||||||
if self.editingDefault:
|
if self.editingDefault:
|
||||||
newThemeItem = self.ThemeListWidget.findItems(name,
|
if self.saveThemeName != name:
|
||||||
QtCore.Qt.MatchExactly)[0]
|
newThemeItem = self.ThemeListWidget.findItems(name,
|
||||||
newThemeIndex = self.ThemeListWidget.indexFromItem(
|
QtCore.Qt.MatchExactly)[0]
|
||||||
newThemeItem).row()
|
newThemeIndex = self.ThemeListWidget.indexFromItem(
|
||||||
self.global_theme = unicode(
|
newThemeItem).row()
|
||||||
self.ThemeListWidget.item(newThemeIndex).text())
|
self.global_theme = unicode(
|
||||||
newName = unicode(translate('ThemeManager', '%s (default)')) % \
|
self.ThemeListWidget.item(newThemeIndex).text())
|
||||||
self.global_theme
|
newName = unicode(translate('ThemeManager',
|
||||||
self.ThemeListWidget.item(newThemeIndex).setText(newName)
|
'%s (default)')) % self.global_theme
|
||||||
QtCore.QSettings().setValue(
|
self.ThemeListWidget.item(newThemeIndex).setText(newName)
|
||||||
self.settingsSection + u'/global theme',
|
QtCore.QSettings().setValue(
|
||||||
QtCore.QVariant(self.global_theme))
|
self.settingsSection + u'/global theme',
|
||||||
Receiver.send_message(u'theme_update_global', self.global_theme)
|
QtCore.QVariant(self.global_theme))
|
||||||
|
Receiver.send_message(u'theme_update_global',
|
||||||
|
self.global_theme)
|
||||||
self.editingDefault = False
|
self.editingDefault = False
|
||||||
self.pushThemes()
|
self.pushThemes()
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user