mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 20:28:57 +03:00
SelectiveSyncTreeView: show the size for the root item (#3755)
This commit is contained in:
parent
df135a0bb2
commit
5cac90b3eb
1 changed files with 5 additions and 1 deletions
|
@ -159,7 +159,6 @@ void SelectiveSyncTreeView::recursiveInsert(QTreeWidgetItem* parent, QStringList
|
|||
void SelectiveSyncTreeView::slotUpdateDirectories(QStringList list)
|
||||
{
|
||||
auto job = qobject_cast<LsColJob *>(sender());
|
||||
|
||||
QScopedValueRollback<bool> isInserting(_inserting);
|
||||
_inserting = true;
|
||||
|
||||
|
@ -222,6 +221,11 @@ void SelectiveSyncTreeView::slotUpdateDirectories(QStringList list)
|
|||
} else {
|
||||
root->setCheckState(0, Qt::PartiallyChecked);
|
||||
}
|
||||
qint64 size = job ? job->_sizes.value(pathToRemove, -1) : -1;
|
||||
if (size >= 0) {
|
||||
root->setText(1, Utility::octetsToString(size));
|
||||
root->setData(1, Qt::UserRole, size);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (QString path, list) {
|
||||
|
|
Loading…
Reference in a new issue