mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-15 01:17:16 -05:00
Expand All/Contacts items by default & store/load expand settings.
This commit is contained in:
parent
672ab256d7
commit
a63482d642
@ -250,6 +250,10 @@ void IdDialog::processSettings(bool load)
|
|||||||
|
|
||||||
// state of splitter
|
// state of splitter
|
||||||
Settings->setValue("splitter", ui->splitter->saveState());
|
Settings->setValue("splitter", ui->splitter->saveState());
|
||||||
|
|
||||||
|
//save expanding
|
||||||
|
Settings->setValue("ExpandAll", allItem->isExpanded());
|
||||||
|
Settings->setValue("ExpandContacts", contactsItem->isExpanded());
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings->endGroup();
|
Settings->endGroup();
|
||||||
@ -511,6 +515,11 @@ void IdDialog::insertIdList(uint32_t token)
|
|||||||
ui->idTreeWidget->insertTopLevelItem(0, contactsItem );
|
ui->idTreeWidget->insertTopLevelItem(0, contactsItem );
|
||||||
ui->idTreeWidget->insertTopLevelItem(0, allItem);
|
ui->idTreeWidget->insertTopLevelItem(0, allItem);
|
||||||
|
|
||||||
|
Settings->beginGroup("IdDialog");
|
||||||
|
allItem->setExpanded(Settings->value("ExpandAll", QVariant(true)).toBool());
|
||||||
|
contactsItem->setExpanded(Settings->value("ExpandContacts", QVariant(true)).toBool());
|
||||||
|
Settings->endGroup();
|
||||||
|
|
||||||
if (fillIdListItem(vit->second, item, ownPgpId, accept))
|
if (fillIdListItem(vit->second, item, ownPgpId, accept))
|
||||||
if(vit->second.mIsAContact)
|
if(vit->second.mIsAContact)
|
||||||
contactsItem->addChild(item);
|
contactsItem->addChild(item);
|
||||||
|
Loading…
Reference in New Issue
Block a user