Fix seeing double torrents in classic mode

Need to ignore torrent added events from state as they are already
loaded by _on_session_state
This commit is contained in:
Calum Lind 2013-05-17 16:14:55 +01:00
parent 235b7348ae
commit 77bdcfa7a4
1 changed files with 3 additions and 2 deletions

View File

@ -738,8 +738,9 @@ class TorrentView(listview.ListView, component.Component):
self.save_state()
def on_torrentadded_event(self, torrent_id, from_state):
self.add_row(torrent_id)
self.mark_dirty(torrent_id)
if not from_state:
self.add_row(torrent_id)
self.mark_dirty(torrent_id)
def on_torrentremoved_event(self, torrent_id):
self.remove_row(torrent_id)