Merge branch 'mig5-delete_multiple_items'

This commit is contained in:
Micah Lee 2017-05-30 12:06:11 -07:00
commit c6400758bc
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -35,6 +35,7 @@ class FileList(QtWidgets.QListWidget):
self.setAcceptDrops(True)
self.setIconSize(QtCore.QSize(32, 32))
self.setSortingEnabled(True)
self.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
class DropHereLabel(QtWidgets.QLabel):
"""
@ -253,9 +254,11 @@ class FileSelection(QtWidgets.QVBoxLayout):
"""
Delete button clicked
"""
current_row = self.file_list.currentRow()
self.file_list.filenames.pop(current_row)
self.file_list.takeItem(current_row)
selected = self.file_list.selectedItems()
for item in selected:
itemrow = self.file_list.row(item)
self.file_list.filenames.pop(itemrow)
self.file_list.takeItem(itemrow)
self.update()
def server_started(self):