@ -111,7 +111,10 @@ QList<QVariantMap> EventManager::getPropFilesInfo(QString hash) const {
file["name"] = name;
}
file["size"] = misc::friendlyUnit((double)fi->size);
if(fi->size > 0)
file["progress"] = fp[i]/(double)fi->size;
else
file["progress"] = 1.; // Empty file...
file["priority"] = priorities[i];
files << file;
++i;
@ -272,7 +272,10 @@ public:
void updateFilesProgress(std::vector<size_type> fp) {
for(unsigned int i=0; i<fp.size(); ++i) {
TreeItem *item = files_index[i];
if(item->getSize() > 0)
item->setProgress((float)fp[i]/(float)item->getSize());
item->setProgress(1.); // Empty file...
emit layoutChanged();