Do not rename when name has not changed

This commit is contained in:
Jon Tibble 2010-07-21 02:34:27 +01:00
parent 5bb55fb63e
commit db025be243

View File

@ -605,19 +605,21 @@ class ThemeManager(QtGui.QWidget):
if newThemeIndex != -1:
self.serviceComboBox.setCurrentIndex(newThemeIndex)
if self.editingDefault:
if self.saveThemeName != name:
newThemeItem = self.ThemeListWidget.findItems(name,
QtCore.Qt.MatchExactly)[0]
newThemeIndex = self.ThemeListWidget.indexFromItem(
newThemeItem).row()
self.global_theme = unicode(
self.ThemeListWidget.item(newThemeIndex).text())
newName = unicode(translate('ThemeManager', '%s (default)')) % \
self.global_theme
newName = unicode(translate('ThemeManager',
'%s (default)')) % self.global_theme
self.ThemeListWidget.item(newThemeIndex).setText(newName)
QtCore.QSettings().setValue(
self.settingsSection + u'/global theme',
QtCore.QVariant(self.global_theme))
Receiver.send_message(u'theme_update_global', self.global_theme)
Receiver.send_message(u'theme_update_global',
self.global_theme)
self.editingDefault = False
self.pushThemes()
else: