mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
clear the [notebooks] section first before storing new one
Signed-off-by: Le Tan <tamlokveer@gmail.com>
This commit is contained in:
parent
1f80fb8583
commit
2bd3194af6
@ -76,6 +76,11 @@ void VConfigManager::readNotebookFromSettings()
|
|||||||
|
|
||||||
void VConfigManager::writeNotebookToSettings()
|
void VConfigManager::writeNotebookToSettings()
|
||||||
{
|
{
|
||||||
|
// Clear it first
|
||||||
|
userSettings->beginGroup("notebooks");
|
||||||
|
userSettings->remove("");
|
||||||
|
userSettings->endGroup();
|
||||||
|
|
||||||
userSettings->beginWriteArray("notebooks");
|
userSettings->beginWriteArray("notebooks");
|
||||||
for (int i = 0; i < notebooks.size(); ++i) {
|
for (int i = 0; i < notebooks.size(); ++i) {
|
||||||
userSettings->setArrayIndex(i);
|
userSettings->setArrayIndex(i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user