mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-25 23:06:10 -05: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);
|
ui->setupUi(this);
|
||||||
|
|
||||||
mInitialized = false;
|
mInitialized = false;
|
||||||
|
mInFill = false;
|
||||||
mCountChildMsgs = false;
|
mCountChildMsgs = false;
|
||||||
mYourGroups = NULL;
|
mYourGroups = NULL;
|
||||||
mSubscribedGroups = NULL;
|
mSubscribedGroups = NULL;
|
||||||
@ -555,6 +556,10 @@ GxsCommentDialog *GxsGroupFrameDialog::commentWidget(const RsGxsMessageId &msgId
|
|||||||
|
|
||||||
void GxsGroupFrameDialog::changedGroup(const QString &groupId)
|
void GxsGroupFrameDialog::changedGroup(const QString &groupId)
|
||||||
{
|
{
|
||||||
|
if (mInFill) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mGroupId = RsGxsGroupId(groupId.toStdString());
|
mGroupId = RsGxsGroupId(groupId.toStdString());
|
||||||
if (mGroupId.isNull()) {
|
if (mGroupId.isNull()) {
|
||||||
return;
|
return;
|
||||||
@ -689,6 +694,8 @@ void GxsGroupFrameDialog::insertGroupsData(const std::list<RsGroupMetaData> &gro
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mInFill = true;
|
||||||
|
|
||||||
std::list<RsGroupMetaData>::const_iterator it;
|
std::list<RsGroupMetaData>::const_iterator it;
|
||||||
|
|
||||||
QList<GroupItemInfo> adminList;
|
QList<GroupItemInfo> adminList;
|
||||||
@ -752,6 +759,8 @@ void GxsGroupFrameDialog::insertGroupsData(const std::list<RsGroupMetaData> &gro
|
|||||||
ui->groupTreeWidget->fillGroupItems(mPopularGroups, popList);
|
ui->groupTreeWidget->fillGroupItems(mPopularGroups, popList);
|
||||||
ui->groupTreeWidget->fillGroupItems(mOtherGroups, otherList);
|
ui->groupTreeWidget->fillGroupItems(mOtherGroups, otherList);
|
||||||
|
|
||||||
|
mInFill = false;
|
||||||
|
|
||||||
/* Re-fill group */
|
/* Re-fill group */
|
||||||
if (!ui->groupTreeWidget->activateId(QString::fromStdString(mGroupId.toStdString()), true)) {
|
if (!ui->groupTreeWidget->activateId(QString::fromStdString(mGroupId.toStdString()), true)) {
|
||||||
mGroupId.clear();
|
mGroupId.clear();
|
||||||
|
@ -175,6 +175,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
bool mInitialized;
|
bool mInitialized;
|
||||||
|
bool mInFill;
|
||||||
QString mSettingsName;
|
QString mSettingsName;
|
||||||
RsGxsGroupId mGroupId;
|
RsGxsGroupId mGroupId;
|
||||||
RsGxsIfaceHelper *mInterface;
|
RsGxsIfaceHelper *mInterface;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user