Great improve size calculation in torrent content model

Step to address issue #24.
This commit is contained in:
Christophe Dumez 2012-08-27 21:04:24 +03:00
commit d7ea394993
4 changed files with 10 additions and 17 deletions

View file

@ -53,9 +53,8 @@ TorrentContentModelFile::TorrentContentModelFile(const libtorrent::file_entry& f
m_size = (qulonglong)f.size;
// Update parent
// Add to parent
m_parentItem->appendChild(this);
m_parentItem->updateSize();
}
int TorrentContentModelFile::fileIndex() const
@ -74,7 +73,6 @@ void TorrentContentModelFile::setPriority(int new_prio, bool update_parent)
// Update parent
if (update_parent) {
m_parentItem->updateSize();
m_parentItem->updateProgress();
m_parentItem->updatePriority();
}