From d3e70b7f7f201a7639ef21a09dd321c91d4aaaee Mon Sep 17 00:00:00 2001 From: Asmageddon Date: Sun, 27 May 2012 00:02:46 +0200 Subject: [PATCH] Don't reset cursor position when going back from torrent detail view --- deluge/ui/console/commands/gui.py | 1 + deluge/ui/console/modes/alltorrents.py | 1 - deluge/ui/console/modes/torrentdetail.py | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/deluge/ui/console/commands/gui.py b/deluge/ui/console/commands/gui.py index 35335e9fb..eca455af6 100644 --- a/deluge/ui/console/commands/gui.py +++ b/deluge/ui/console/commands/gui.py @@ -48,4 +48,5 @@ class Command(BaseCommand): except KeyError: at = AllTorrents(console.stdscr,console.encoding) console.set_mode(at) + at._go_top = True at.resume() diff --git a/deluge/ui/console/modes/alltorrents.py b/deluge/ui/console/modes/alltorrents.py index b380f39dc..50fc8951c 100644 --- a/deluge/ui/console/modes/alltorrents.py +++ b/deluge/ui/console/modes/alltorrents.py @@ -325,7 +325,6 @@ class AllTorrents(BaseMode, component.Component): self.__help_lines = format_utils.wrap_string(HELP_STR,(self.cols/2)-2) def resume(self): - self._go_top = True component.start(["AllTorrents"]) self.refresh() diff --git a/deluge/ui/console/modes/torrentdetail.py b/deluge/ui/console/modes/torrentdetail.py index d1197e8b7..3298fa958 100644 --- a/deluge/ui/console/modes/torrentdetail.py +++ b/deluge/ui/console/modes/torrentdetail.py @@ -470,6 +470,7 @@ class TorrentDetail(BaseMode, component.Component): component.deregister(self) self.stdscr.clear() component.get("ConsoleUI").set_mode(self.alltorrentmode) + self.alltorrentmode._go_top = False self.alltorrentmode.resume() # build list of priorities for all files in the torrent