Images being deleted try to preview them selves if single click enabled.

If they do not exists they pop up an error.
Turn off selection during the deletion process to stop this.

bzr-revno: 1746
Fixes: https://launchpad.net/bugs/835033
This commit is contained in:
Tim Bentley 2011-09-15 17:48:42 +01:00
commit 29a2b78f13

View File

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