Remove unneeded 'except RuntimeError'
This commit is contained in:
parent
794df11b01
commit
15ce2746eb
@ -119,10 +119,7 @@ class DownloadView(QListView):
|
|||||||
|
|
||||||
def sizeHint(self):
|
def sizeHint(self):
|
||||||
"""Return sizeHint based on the view contents."""
|
"""Return sizeHint based on the view contents."""
|
||||||
try:
|
|
||||||
idx = self.model().last_index()
|
idx = self.model().last_index()
|
||||||
except RuntimeError:
|
|
||||||
pass
|
|
||||||
height = self.visualRect(idx).bottom()
|
height = self.visualRect(idx).bottom()
|
||||||
if height != -1:
|
if height != -1:
|
||||||
size = QSize(0, height + 2)
|
size = QSize(0, height + 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user