fixed a bug, where themes 'lost' their background image; fixed theme re name when the name has not been changed

This commit is contained in:
Andreas Preikschat 2011-04-17 14:36:35 +02:00
parent 83e06b6eb1
commit d3a0952d66

View File

@ -280,6 +280,8 @@ class ThemeManager(QtGui.QWidget):
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
if self.fileRenameForm.exec_():
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
if oldThemeName == newThemeName:
return
if self.checkIfThemeExists(newThemeName):
oldThemeData = self.getThemeData(oldThemeName)
self.cloneThemeData(oldThemeData, newThemeName)
@ -333,6 +335,7 @@ class ThemeManager(QtGui.QWidget):
self.oldBackgroundImage = theme.background_filename
self.themeForm.theme = theme
self.themeForm.exec_(True)
self.oldBackgroundImage = None
def onDeleteTheme(self):
"""