mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 04:24:27 +00:00
fix for only drawing one effected line and only draw effected lines on marking
This commit is contained in:
parent
eba7c2bf17
commit
5dcc935852
@ -503,6 +503,7 @@ class AllTorrents(BaseMode):
|
||||
attr = None
|
||||
if lines:
|
||||
tidx = lines.pop()+1
|
||||
currow = tidx-self.curoff+2
|
||||
|
||||
if tidx in self.marked:
|
||||
bg = "blue"
|
||||
@ -532,9 +533,6 @@ class AllTorrents(BaseMode):
|
||||
else:
|
||||
colorstr = "{!%s,%s!}"%(fg,bg)
|
||||
|
||||
if lines:
|
||||
currow = tidx-self.curoff+2
|
||||
|
||||
self.add_string(currow,"%s%s"%(colorstr,row[0]))
|
||||
tidx += 1
|
||||
currow += 1
|
||||
@ -636,11 +634,14 @@ class AllTorrents(BaseMode):
|
||||
self.updater.set_torrent_to_update(cid,self._status_keys)
|
||||
elif chr(c) == 'm':
|
||||
self._mark_unmark(self.cursel)
|
||||
effected_lines = [self.cursel-1]
|
||||
elif chr(c) == 'M':
|
||||
if self.last_mark >= 0:
|
||||
self.marked.extend(range(self.last_mark,self.cursel+1))
|
||||
effected_lines = range(self.last_mark,self.cursel)
|
||||
else:
|
||||
self._mark_unmark(self.cursel)
|
||||
effected_lines = [self.cursel-1]
|
||||
elif chr(c) == 'c':
|
||||
self.marked = []
|
||||
self.last_mark = -1
|
||||
|
@ -96,6 +96,8 @@ class TorrentDetail(BaseMode, component.Component):
|
||||
|
||||
self.column_string = ""
|
||||
|
||||
self.marked = {}
|
||||
|
||||
BaseMode.__init__(self, stdscr, encoding)
|
||||
component.Component.__init__(self, "TorrentDetail", 1, depend=["SessionProxy"])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user