|
|
@ -124,21 +124,14 @@ void TorrentContentModelFolder::setPriority(int new_prio, bool update_parent) |
|
|
|
|
|
|
|
|
|
|
|
m_priority = new_prio; |
|
|
|
m_priority = new_prio; |
|
|
|
|
|
|
|
|
|
|
|
// Update parent
|
|
|
|
// Update parent priority
|
|
|
|
if (update_parent) { |
|
|
|
if (update_parent) |
|
|
|
m_parentItem->updateSize(); |
|
|
|
|
|
|
|
m_parentItem->updateProgress(); |
|
|
|
|
|
|
|
m_parentItem->updatePriority(); |
|
|
|
m_parentItem->updatePriority(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Update children
|
|
|
|
// Update children
|
|
|
|
if (m_priority != prio::PARTIAL) { |
|
|
|
if (m_priority != prio::PARTIAL) { |
|
|
|
qDebug("Updating children items"); |
|
|
|
foreach (TorrentContentModelItem* child, m_childItems) |
|
|
|
foreach (TorrentContentModelItem* child, m_childItems) { |
|
|
|
|
|
|
|
// Do not update the parent since
|
|
|
|
|
|
|
|
// the parent is causing the update
|
|
|
|
|
|
|
|
child->setPriority(m_priority, false); |
|
|
|
child->setPriority(m_priority, false); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
updateSize(); |
|
|
|
updateSize(); |
|
|
|