don't enter torrentdetails if nothing is selected

This commit is contained in:
Nick 2011-02-02 18:32:03 +01:00
parent b35875e300
commit 78ea5c9bd3
1 changed files with 7 additions and 5 deletions

View File

@ -606,11 +606,13 @@ class AllTorrents(BaseMode):
elif c == curses.KEY_RIGHT:
# We enter a new mode for the selected torrent here
if not self.marked:
component.stop(["AllTorrentsStateUpdater"])
self.stdscr.clear()
td = TorrentDetail(self,self._current_torrent_id(),self.stdscr,self.encoding)
component.get("ConsoleUI").set_mode(td)
return
tid = self._current_torrent_id()
if tid:
component.stop(["AllTorrentsStateUpdater"])
self.stdscr.clear()
td = TorrentDetail(self,self._current_torrent_id(),self.stdscr,self.encoding)
component.get("ConsoleUI").set_mode(td)
return
# Enter Key
elif c == curses.KEY_ENTER or c == 10: