Blender addon - save preference if valid key

This commit is contained in:
Trevor SANDY 2024-08-18 16:38:50 +02:00
parent da803dc315
commit f89a9767d6

View file

@ -2619,7 +2619,7 @@ void lcBlenderPreferences::SaveSettings()
Key = mBlenderPaths[LblIdx].key;
Value = QDir::toNativeSeparators(mBlenderPaths[LblIdx].value);
if (Settings.contains(Key))
if (!Key.isEmpty())
Settings.setValue(Key, QVariant(Value));
}
@ -2643,7 +2643,7 @@ void lcBlenderPreferences::SaveSettings()
Key = mBlenderSettings[LblIdx].key;
if (Settings.contains(Key))
if (!Key.isEmpty())
Settings.setValue(Key, QVariant(Value));
}
@ -2662,7 +2662,7 @@ void lcBlenderPreferences::SaveSettings()
Key = mBlenderPaths[LblIdx].key_mm;
Value = QDir::toNativeSeparators(mBlenderPaths[LblIdx].value);
if (Settings.contains(Key))
if (!Key.isEmpty())
Settings.setValue(Key, QVariant(Value));
}
@ -2683,7 +2683,7 @@ void lcBlenderPreferences::SaveSettings()
Key = mBlenderSettingsMM[LblIdx].key;
if (Settings.contains(Key))
if (!Key.isEmpty())
Settings.setValue(Key, QVariant(Value));
}