mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Great improve size calculation in torrent content model
Step to address issue #24.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user