mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
GxsGroupFrameDialog: Fixed restore of active group tree item when subscrube/unsubscribe a group.
This commit is contained in:
parent
389f2f0528
commit
da66ac5cff
@ -73,6 +73,7 @@ GxsGroupFrameDialog::GxsGroupFrameDialog(RsGxsIfaceHelper *ifaceImpl, QWidget *p
|
||||
ui->setupUi(this);
|
||||
|
||||
mInitialized = false;
|
||||
mInFill = false;
|
||||
mCountChildMsgs = false;
|
||||
mYourGroups = NULL;
|
||||
mSubscribedGroups = NULL;
|
||||
@ -555,6 +556,10 @@ GxsCommentDialog *GxsGroupFrameDialog::commentWidget(const RsGxsMessageId &msgId
|
||||
|
||||
void GxsGroupFrameDialog::changedGroup(const QString &groupId)
|
||||
{
|
||||
if (mInFill) {
|
||||
return;
|
||||
}
|
||||
|
||||
mGroupId = RsGxsGroupId(groupId.toStdString());
|
||||
if (mGroupId.isNull()) {
|
||||
return;
|
||||
@ -689,6 +694,8 @@ void GxsGroupFrameDialog::insertGroupsData(const std::list<RsGroupMetaData> &gro
|
||||
return;
|
||||
}
|
||||
|
||||
mInFill = true;
|
||||
|
||||
std::list<RsGroupMetaData>::const_iterator it;
|
||||
|
||||
QList<GroupItemInfo> adminList;
|
||||
@ -752,6 +759,8 @@ void GxsGroupFrameDialog::insertGroupsData(const std::list<RsGroupMetaData> &gro
|
||||
ui->groupTreeWidget->fillGroupItems(mPopularGroups, popList);
|
||||
ui->groupTreeWidget->fillGroupItems(mOtherGroups, otherList);
|
||||
|
||||
mInFill = false;
|
||||
|
||||
/* Re-fill group */
|
||||
if (!ui->groupTreeWidget->activateId(QString::fromStdString(mGroupId.toStdString()), true)) {
|
||||
mGroupId.clear();
|
||||
|
@ -175,6 +175,7 @@ protected:
|
||||
|
||||
private:
|
||||
bool mInitialized;
|
||||
bool mInFill;
|
||||
QString mSettingsName;
|
||||
RsGxsGroupId mGroupId;
|
||||
RsGxsIfaceHelper *mInterface;
|
||||
|
Loading…
Reference in New Issue
Block a user