Fixed resize causing crashes and/or improper resize of AllTorrents view

This commit is contained in:
Asmageddon 2012-05-29 20:51:28 +02:00
parent 0dbea0ed01
commit 935777fb49
2 changed files with 14 additions and 3 deletions

View File

@ -473,11 +473,14 @@ class AllTorrents(BaseMode, component.Component):
def on_resize(self, *args):
BaseMode.on_resize_norefresh(self, *args)
self.__update_columns()
self.__split_help()
if self.popup:
self.popup.handle_resize()
self.refresh()
self.update()
self.__update_columns()
self.__split_help()
self.refresh([])
def _queue_sort(self, v1, v2):
if v1 == v2:

View File

@ -316,7 +316,15 @@ class Legacy(BaseMode, component.Component):
pass
self.stdscr.refresh()
def on_resize(self, *args):
BaseMode.on_resize_norefresh(self, *args)
#We need to also refresh AllTorrents because otherwise it will
# be only us that get properly resized
all_torrents = component.get("AllTorrents")
all_torrents.on_resize(*args)
self.stdscr.erase()
self.refresh()
def refresh(self):
"""