diff --git a/retroshare-gui/src/gui/RemoteDirModel.cpp b/retroshare-gui/src/gui/RemoteDirModel.cpp index df06f3bbb..8807897dd 100644 --- a/retroshare-gui/src/gui/RemoteDirModel.cpp +++ b/retroshare-gui/src/gui/RemoteDirModel.cpp @@ -325,6 +325,8 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const return QString::fromUtf8(details.name.c_str()); case 1: return QString() ; + case 2: + return misc::userFriendlyDuration(details.min_age); default: return QString() ; } @@ -433,6 +435,8 @@ QVariant TreeStyle_RDM::sortRole(const QModelIndex& index,const DirDetails& deta return QString::fromUtf8(details.name.c_str()); case 1: return QString(); + case 2: + return details.min_age; default: return QString(); } diff --git a/retroshare-gui/src/gui/SharedFilesDialog.cpp b/retroshare-gui/src/gui/SharedFilesDialog.cpp index 9cfd53116..cb9b2aca4 100644 --- a/retroshare-gui/src/gui/SharedFilesDialog.cpp +++ b/retroshare-gui/src/gui/SharedFilesDialog.cpp @@ -907,10 +907,19 @@ void SharedFilesDialog::indicatorChanged(int index) model->changeAgeIndicator(correct_indicator[index]); localModel->changeAgeIndicator(correct_indicator[index]); - ui.remoteDirTreeView->update(ui.remoteDirTreeView->rootIndex()); - ui.localDirTreeView->update(ui.localDirTreeView->rootIndex()) ; + ui.remoteDirTreeView->update(ui.remoteDirTreeView->rootIndex()); + ui.localDirTreeView->update(ui.localDirTreeView->rootIndex()) ; + + if (correct_indicator[index] != IND_ALWAYS) + { + ui.remoteDirTreeView->sortByColumn(2, Qt::AscendingOrder); + } + else + { + ui.remoteDirTreeView->sortByColumn(0, Qt::AscendingOrder); + } - updateDisplay() ; + updateDisplay() ; } void SharedFilesDialog::filterRegExpChanged()