From f89a9767d6d4d157cbfe0f4fc23c2b2b9ae12dfb Mon Sep 17 00:00:00 2001 From: Trevor SANDY Date: Sun, 18 Aug 2024 16:38:50 +0200 Subject: [PATCH] Blender addon - save preference if valid key --- common/lc_blenderpreferences.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/lc_blenderpreferences.cpp b/common/lc_blenderpreferences.cpp index 9689e33b..ca13b8a1 100644 --- a/common/lc_blenderpreferences.cpp +++ b/common/lc_blenderpreferences.cpp @@ -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)); }