From 3a54b2de153ba571e79573420ca313d4f9caa628 Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 3 Jan 2021 22:34:36 +0100 Subject: [PATCH] fixed bug in forum post addressing, causing bad update of what has changed when setting messages as read --- retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp index 290e80431..7e70e8b34 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumModel.cpp @@ -1276,7 +1276,10 @@ void RsGxsForumModel::recursSetMsgReadStatus(ForumModelIndex i,bool read_status, else rsGxsForums->setMessageReadStatus(token,std::make_pair( mForumGroup.mMeta.mGroupId, mPosts[i].mMsgId ), read_status); - QModelIndex itemIndex = createIndex(i - 1, 0, &mPosts[i]); + void *ref ; + convertTabEntryToRefPointer(i,ref); // we dont use i+1 here because i is not a row, but an index in the mPosts tab + + QModelIndex itemIndex = createIndex(i - 1, 0, ref); emit dataChanged(itemIndex, itemIndex); }