forked from openlp/openlp
fixed deletion bug in media manager (custom, media, images, presentations)
This commit is contained in:
parent
eccd2999ee
commit
51e07d66df
@ -134,11 +134,14 @@ class CustomMediaItem(MediaManagerItem):
|
|||||||
if check_item_selected(self.ListView,
|
if check_item_selected(self.ListView,
|
||||||
translate('CustomPlugin.MediaItem',
|
translate('CustomPlugin.MediaItem',
|
||||||
'You must select an item to delete.')):
|
'You must select an item to delete.')):
|
||||||
item = self.ListView.currentItem()
|
row_list = [item.row() for item in self.ListView.selectedIndexes()]
|
||||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
row_list.sort(reverse=True)
|
||||||
self.parent.custommanager.delete_custom(item_id)
|
id_list = [(item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
row = self.ListView.row(item)
|
for item in self.ListView.selectedIndexes()]
|
||||||
self.ListView.takeItem(row)
|
for id in id_list:
|
||||||
|
self.parent.custommanager.delete_custom(id)
|
||||||
|
for row in row_list:
|
||||||
|
self.ListView.takeItem(row)
|
||||||
|
|
||||||
def generateSlideData(self, service_item, item=None):
|
def generateSlideData(self, service_item, item=None):
|
||||||
raw_slides = []
|
raw_slides = []
|
||||||
|
Loading…
Reference in New Issue
Block a user