Module: deluge Branch: multiuser-oldprefs Commit: d05352db65122cd2c79e97343cfa8120095fa40f
Author: Nick Lanham <[email protected]> Date: Tue Apr 26 14:03:49 2011 +0200 fix bug for selecting multiple torrents with cursor above last mark (bug 1689) --- deluge/ui/console/modes/alltorrents.py | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/deluge/ui/console/modes/alltorrents.py b/deluge/ui/console/modes/alltorrents.py index 68e8a59..53a0454 100644 --- a/deluge/ui/console/modes/alltorrents.py +++ b/deluge/ui/console/modes/alltorrents.py @@ -813,8 +813,12 @@ class AllTorrents(BaseMode, component.Component): 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) + if (self.cursel+1) > self.last_mark: + mrange = range(self.last_mark,self.cursel+1) + else: + mrange = range(self.cursel-1,self.last_mark) + self.marked.extend(mrange[1:]) + effected_lines = mrange else: self._mark_unmark(self.cursel) effected_lines = [self.cursel-1] -- You received this message because you are subscribed to the Google Groups "deluge-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/deluge-commit?hl=en.
