Set the File List widget to readonly while running, so items can't be deleted mid-share

This commit is contained in:
Miguel Jacq 2018-02-07 16:40:41 +11:00
parent 37657ca453
commit 0b18129947
No known key found for this signature in database
GPG Key ID: EEA4341C6D97A0B6

View File

@ -178,6 +178,12 @@ class ServerStatus(QtWidgets.QWidget):
self.copy_url_button.hide()
self.copy_hidservauth_button.hide()
# Set the File List widget to readonly while running, so items can't be deleted mid-share
if self.status == self.STATUS_STARTED or self.status == self.STATUS_WORKING:
self.file_selection.file_list.setEnabled(False)
else:
self.file_selection.file_list.setEnabled(True)
# Button
button_stopped_style = 'QPushButton { background-color: #5fa416; color: #ffffff; padding: 10px; border: 0; border-radius: 5px; }'
button_working_style = 'QPushButton { background-color: #4c8211; color: #ffffff; padding: 10px; border: 0; border-radius: 5px; font-style: italic; }'