diff --git a/retroshare-gui/src/gui/RemoteDirModel.cpp b/retroshare-gui/src/gui/RemoteDirModel.cpp index edee8df4e..7ef7bd848 100644 --- a/retroshare-gui/src/gui/RemoteDirModel.cpp +++ b/retroshare-gui/src/gui/RemoteDirModel.cpp @@ -56,7 +56,7 @@ RetroshareDirModel::RetroshareDirModel(bool mode, QObject *parent) #endif treeStyle(); - mLastPointer = (void*)intptr_t(0xffffffff) ; + mDirDetails.ref = (void*)intptr_t(0xffffffff) ; mLastRemote = false ; } @@ -972,9 +972,9 @@ bool RetroshareDirModel::requestDirDetails(void *ref, bool remote,DirDetails& d) time_t now = time(NULL); - if(mLastPointer == ref && mLastRemote==remote && now < 2+mLastReq) + if(mDirDetails.ref == ref && mLastRemote==remote && now < 2+mLastReq) { - d = mLastDirDetails ; + d = mDirDetails ; return true ; } @@ -983,9 +983,8 @@ bool RetroshareDirModel::requestDirDetails(void *ref, bool remote,DirDetails& d) if(rsFiles->RequestDirDetails(ref, d, flags)) { mLastReq = now ; - mLastPointer = ref ; mLastRemote = remote ; - mLastDirDetails = d; + mDirDetails = d; return true; } diff --git a/retroshare-gui/src/gui/RemoteDirModel.h b/retroshare-gui/src/gui/RemoteDirModel.h index aa0f9d361..67af273df 100644 --- a/retroshare-gui/src/gui/RemoteDirModel.h +++ b/retroshare-gui/src/gui/RemoteDirModel.h @@ -153,8 +153,7 @@ class RetroshareDirModel : public QAbstractItemModel // This material attempts to keep last request in cache, with no search cost. - mutable DirDetails mLastDirDetails ; - mutable void *mLastPointer ; + mutable DirDetails mDirDetails ; mutable bool mLastRemote ; mutable time_t mLastReq; };