don't enter torrentdetails if nothing is selected

This commit is contained in:
Nick 2011-02-02 18:32:03 +01:00
commit 78ea5c9bd3

View file

@ -606,6 +606,8 @@ class AllTorrents(BaseMode):
elif c == curses.KEY_RIGHT: elif c == curses.KEY_RIGHT:
# We enter a new mode for the selected torrent here # We enter a new mode for the selected torrent here
if not self.marked: if not self.marked:
tid = self._current_torrent_id()
if tid:
component.stop(["AllTorrentsStateUpdater"]) component.stop(["AllTorrentsStateUpdater"])
self.stdscr.clear() self.stdscr.clear()
td = TorrentDetail(self,self._current_torrent_id(),self.stdscr,self.encoding) td = TorrentDetail(self,self._current_torrent_id(),self.stdscr,self.encoding)