Amend check to allow deletes to work if theme image is removed

bzr-revno: 1800
This commit is contained in:
Tim Bentley 2011-11-19 09:07:01 +00:00
commit 290c01f38b

View File

@ -370,7 +370,7 @@ class ThemeManager(QtGui.QWidget):
def onExportTheme(self):
"""
Save the theme in a zip file
Export the theme in a zip file
"""
item = self.themeListWidget.currentItem()
if item is None:
@ -625,7 +625,7 @@ class ThemeManager(QtGui.QWidget):
theme_dir = os.path.join(self.path, name)
check_directory_exists(theme_dir)
theme_file = os.path.join(theme_dir, name + u'.xml')
if imageTo and self.oldBackgroundImage and \
if self.oldBackgroundImage and \
imageTo != self.oldBackgroundImage:
delete_file(self.oldBackgroundImage)
outfile = None