Turn off autopreview when deleting images.

Stops images being deleted trying to preview themselves.

Fixes: https://launchpad.net/bugs/835033
This commit is contained in:
Tim Bentley 2011-09-14 21:27:30 +01:00
parent 7469c08674
commit 53b3b394e9

View File

@ -99,6 +99,8 @@ class ImageMediaItem(MediaManagerItem):
"""
Remove an image item from the list
"""
# Turn off auto preview triggers.
self.listView.blockSignals(True)
if check_item_selected(self.listView, translate('ImagePlugin.MediaItem',
'You must select an image to delete.')):
row_list = [item.row() for item in self.listView.selectedIndexes()]
@ -111,6 +113,7 @@ class ImageMediaItem(MediaManagerItem):
self.listView.takeItem(row)
SettingsManager.set_list(self.settingsSection,
u'images', self.getFileList())
self.listView.blockSignals(False)
def loadList(self, images, initialLoad=False):
if not initialLoad: