forked from openlp/openlp
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:
commit
29a2b78f13
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user