mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-28 08:49:30 -05:00
Only do the fake item hack if there are items in the list
This commit is contained in:
parent
d892213db1
commit
e17dbd4fdd
@ -62,7 +62,7 @@ class DropCountLabel(QtWidgets.QLabel):
|
||||
self.setStyleSheet('color: #ffffff; background-color: #f44449; font-weight: bold; padding: 5px 10px; border-radius: 10px;')
|
||||
self.hide()
|
||||
|
||||
def dragLeaveEvent(self, event):
|
||||
def dragEnterEvent(self, event):
|
||||
self.hide()
|
||||
event.accept()
|
||||
|
||||
@ -109,6 +109,7 @@ class FileList(QtWidgets.QListWidget):
|
||||
self.drop_here_image.setGeometry(0, 0, self.width(), self.height() - offset)
|
||||
self.drop_here_text.setGeometry(0, offset, self.width(), self.height() - offset)
|
||||
|
||||
if self.count() > 0:
|
||||
# Add and delete an empty item, to force all items to get redrawn
|
||||
# This is ugly, but the only way I could figure out how to proceed
|
||||
item = QtWidgets.QListWidgetItem('fake item')
|
||||
|
Loading…
Reference in New Issue
Block a user