mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 07:28:39 +00:00
A quick and ugly fix(try-except) for crashes involving multiselection
This commit is contained in:
parent
149cbae4dc
commit
f5c8968aa6
1 changed files with 9 additions and 2 deletions
|
@ -614,7 +614,10 @@ class AllTorrents(BaseMode, component.Component):
|
||||||
if lines:
|
if lines:
|
||||||
todraw = []
|
todraw = []
|
||||||
for l in lines:
|
for l in lines:
|
||||||
|
try:
|
||||||
todraw.append(self.formatted_rows[l])
|
todraw.append(self.formatted_rows[l])
|
||||||
|
except:
|
||||||
|
pass #A quick and ugly fix for crash caused by doing shift-m on last torrent
|
||||||
lines.reverse()
|
lines.reverse()
|
||||||
else:
|
else:
|
||||||
todraw = self.formatted_rows[tidx-1:]
|
todraw = self.formatted_rows[tidx-1:]
|
||||||
|
@ -656,7 +659,11 @@ class AllTorrents(BaseMode, component.Component):
|
||||||
else:
|
else:
|
||||||
colorstr = "{!%s,%s!}"%(fg,bg)
|
colorstr = "{!%s,%s!}"%(fg,bg)
|
||||||
|
|
||||||
|
try:
|
||||||
self.add_string(currow,"%s%s"%(colorstr,row[0]),trim=False)
|
self.add_string(currow,"%s%s"%(colorstr,row[0]),trim=False)
|
||||||
|
except:
|
||||||
|
#Yeah, this should be fixed in some better way
|
||||||
|
pass
|
||||||
tidx += 1
|
tidx += 1
|
||||||
currow += 1
|
currow += 1
|
||||||
if (currow > (self.rows - 2)):
|
if (currow > (self.rows - 2)):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue