From 7c8e80e89bb37d3ec0e4dc29d2806a07724b893c Mon Sep 17 00:00:00 2001 From: defnax Date: Tue, 31 Jan 2023 21:40:15 +0100 Subject: [PATCH] Fixed update groupbox counting for members --- retroshare-gui/src/gui/Circles/CreateCircleDialog.cpp | 11 +++++++++-- retroshare-gui/src/gui/Circles/CreateCircleDialog.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/Circles/CreateCircleDialog.cpp b/retroshare-gui/src/gui/Circles/CreateCircleDialog.cpp index 3c323e286..92003e0a6 100644 --- a/retroshare-gui/src/gui/Circles/CreateCircleDialog.cpp +++ b/retroshare-gui/src/gui/Circles/CreateCircleDialog.cpp @@ -357,8 +357,8 @@ void CreateCircleDialog::addMember(const QString& keyId, const QString& idtype, member->setText(RSCIRCLEID_COL_IDTYPE, idtype); tree->addTopLevelItem(member); - - ui.members_groupBox->setTitle( tr("Invited Members") + " (" + QString::number(ui.treeWidget_membership->topLevelItemCount()) + ")" ); + + updateMembership(); } /** Maybe we can use RsGxsCircleGroup instead of RsGxsCircleDetails ??? (TODO)**/ @@ -413,6 +413,8 @@ void CreateCircleDialog::removeMember() // does this just work? (TODO) delete(item); + + updateMembership(); } void CreateCircleDialog::createCircle() @@ -952,3 +954,8 @@ void CreateCircleDialog::MembershipListCustomPopupMenu( QPoint ) contextMnu.exec(QCursor::pos()); } +void CreateCircleDialog::updateMembership() +{ + ui.members_groupBox->setTitle( tr("Invited Members") + " (" + QString::number(ui.treeWidget_membership->topLevelItemCount()) + ")" ); +} + diff --git a/retroshare-gui/src/gui/Circles/CreateCircleDialog.h b/retroshare-gui/src/gui/Circles/CreateCircleDialog.h index fbbaacb2c..5e713b9c3 100644 --- a/retroshare-gui/src/gui/Circles/CreateCircleDialog.h +++ b/retroshare-gui/src/gui/Circles/CreateCircleDialog.h @@ -56,6 +56,7 @@ private slots: void filterChanged(const QString &text); void createNewGxsId(); void idTypeChanged(); + void updateMembership(); /** Create the context popup menu and it's submenus */ void IdListCustomPopupMenu( QPoint point );