diff --git a/retroshare-gui/src/gui/common/RsCollectionModel.cpp b/retroshare-gui/src/gui/common/RsCollectionModel.cpp index d7d352c8a..f05e25231 100644 --- a/retroshare-gui/src/gui/common/RsCollectionModel.cpp +++ b/retroshare-gui/src/gui/common/RsCollectionModel.cpp @@ -22,7 +22,7 @@ static std::ostream& operator<<(std::ostream& o,const RsCollectionModel::EntryIn } static std::ostream& operator<<(std::ostream& o,const QModelIndex& i) { - return o << "QModelIndex (row " << i.row() << ", of ref " << i.internalId() << ")" ; + return o << "QModelIndex (row " << i.row() << ", ref " << i.internalId() << ")" ; } #ifdef DEBUG_COLLECTION_MODEL #endif @@ -200,7 +200,7 @@ QModelIndex RsCollectionModel::parent(const QModelIndex & index) const return QModelIndex(); EntryIndex i; - if(!convertInternalIdToIndex(index.internalId(),i) || i.index==0) + if(index.internalId()==0 || !convertInternalIdToIndex(index.internalId(),i)) return QModelIndex(); EntryIndex p; @@ -276,7 +276,7 @@ bool RsCollectionModel::setData(const QModelIndex& index,const QVariant& value,i { recursSetCheckFlag(dir_data.subdirs[i],s); mDirInfos[index].total_size += mDirInfos[dir_data.subdirs[i]].total_size ; - ++mDirInfos[index].total_count; + mDirInfos[index].total_count+= mDirInfos[dir_data.subdirs[i]].total_count; } for(uint32_t i=0;i