From 6b008d6c4d0f22789b4d77a747228bce60e47cfe Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 14 Jun 2008 05:31:16 +0000 Subject: [PATCH] Fix #231 clear torrent info if no torrent selected. --- deluge/ui/gtkui/torrentdetails.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deluge/ui/gtkui/torrentdetails.py b/deluge/ui/gtkui/torrentdetails.py index f5f1902f8..2c0427763 100644 --- a/deluge/ui/gtkui/torrentdetails.py +++ b/deluge/ui/gtkui/torrentdetails.py @@ -231,6 +231,10 @@ class TorrentDetails(component.Component): self.save_state() def update(self, page_num=None): + if len(component.get("TorrentView").get_selected_torrents()) == 0: + # No torrents selected, so just clear + self.clear() + if self.notebook.get_property("visible"): if page_num == None: page_num = self.notebook.get_current_page()