Don't reset cursor position when going back from torrent detail view

This commit is contained in:
Asmageddon 2012-05-27 00:02:46 +02:00
parent d86168cb41
commit d3e70b7f7f
3 changed files with 2 additions and 1 deletions

View File

@ -48,4 +48,5 @@ class Command(BaseCommand):
except KeyError: except KeyError:
at = AllTorrents(console.stdscr,console.encoding) at = AllTorrents(console.stdscr,console.encoding)
console.set_mode(at) console.set_mode(at)
at._go_top = True
at.resume() at.resume()

View File

@ -325,7 +325,6 @@ class AllTorrents(BaseMode, component.Component):
self.__help_lines = format_utils.wrap_string(HELP_STR,(self.cols/2)-2) self.__help_lines = format_utils.wrap_string(HELP_STR,(self.cols/2)-2)
def resume(self): def resume(self):
self._go_top = True
component.start(["AllTorrents"]) component.start(["AllTorrents"])
self.refresh() self.refresh()

View File

@ -470,6 +470,7 @@ class TorrentDetail(BaseMode, component.Component):
component.deregister(self) component.deregister(self)
self.stdscr.clear() self.stdscr.clear()
component.get("ConsoleUI").set_mode(self.alltorrentmode) component.get("ConsoleUI").set_mode(self.alltorrentmode)
self.alltorrentmode._go_top = False
self.alltorrentmode.resume() self.alltorrentmode.resume()
# build list of priorities for all files in the torrent # build list of priorities for all files in the torrent