Fix cancel button in PendingTransfersDialog

This commit is contained in:
Raffson 2024-06-01 20:13:14 +02:00
parent 58b4e5284e
commit bb42a1f63a
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -121,6 +121,8 @@ class PendingTransfersDialog(QDialog):
) -> None:
"""Updates the state of the delete button."""
if selected.empty():
self.cancel_button.setEnabled(False)
self.cancel_button.setEnabled(
self.can_cancel(self.transfer_list.currentIndex())
)
return
self.cancel_button.setEnabled(self.can_cancel(selected.indexes()[0]))