mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
Great improve size calculation in torrent content model
Step to address issue #24.
This commit is contained in:
parent
3f755de80b
commit
d7ea394993
4 changed files with 10 additions and 17 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue