mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-12-02 14:49:54 -05:00
Fix settings entries not being cleared when all entries of the same type are removed
This commit is contained in:
1 parent
7e2dfe33fc
commit
f3b9242840
1 file changed
+6
-3
@@ -110,11 +110,14 @@ void ManualDevicesSettingsPage::saveSettings()
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Transfer data from the cached object into config sections |
|
||||
| Use ALL possible settings entry names, so that those with |
|
||||
| all entries deleted are cleared properly |
|
||||
\*---------------------------------------------------------*/
|
||||
json::iterator it;
|
||||
for(it = result.begin(); it != result.end(); ++it)
|
||||
|
||||
std::vector<ManualDeviceTypeBlock> blocks = ManualDevicesTypeManager::get()->getRegisteredTypes();
|
||||
for(int i = 0; i < blocks.size(); ++i)
|
||||
{
|
||||
sm->SetSettings(it.key(), it.value());
|
||||
sm->SetSettings(blocks[i].settingsSection, result[blocks[i].settingsSection]);
|
||||
}
|
||||
sm->SaveSettings();
|
||||
|
||||
|
||||
Reference in new issue
Block a user