From e59ba49240b897647364a4af3da1e0469586cc8b Mon Sep 17 00:00:00 2001 From: csoler Date: Mon, 8 Feb 2021 23:08:15 +0100 Subject: [PATCH] fixed update when expanding in boards --- .../src/gui/Posted/PostedListWidgetWithModel.cpp | 8 ++++++-- retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.h | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp index fa5a33b6b..f2d60ed66 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp +++ b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp @@ -175,7 +175,7 @@ void PostedPostDelegate::expandItem(RsGxsMessageId msgId,bool expanded) else mExpandedItems.erase(msgId); - mPostListWidget->forceRedraw(); + mPostListWidget->redraw(); } uint8_t PostedPostDelegate::displayFlags(const RsGxsMessageId &id) const @@ -659,7 +659,11 @@ void PostedListWidgetWithModel::forceRedraw() if(mPostedPostsModel) mPostedPostsModel->deepUpdate(); } - +void PostedListWidgetWithModel::redraw() +{ + if(mPostedPostsModel) + mPostedPostsModel->triggerRedraw(); +} void PostedListWidgetWithModel::updateDisplay(bool complete) { #ifdef DEBUG_CHANNEL diff --git a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.h b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.h index 0c951b664..99546c306 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.h +++ b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.h @@ -99,7 +99,8 @@ public: virtual bool navigate(const RsGxsMessageId&) override; void updateDisplay(bool complete) ; - void forceRedraw(); // does not re-load the data, but makes sure the underlying model triggers a full redraw, recomputes sizes, etc. + void forceRedraw(); // does not re-load the data, but makes sure the underlying model triggers a full redraw, recomputes indexes, etc. + void redraw(); // does not re-load the data, but makes sure the underlying model triggers a full redraw, recomputes only sizes. #ifdef TODO /* FeedHolder */