diff --git a/extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp b/extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp index c4d05b575f..d378589d27 100644 --- a/extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp +++ b/extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp @@ -111,6 +111,7 @@ void StoredSettings::updateGlobalProps() void StoredSettings::flush() { updateGlobalProps(); + saveSwatchColours(); for (int i = propertyFiles.size(); --i >= 0;) propertyFiles.getUnchecked(i)->saveIfNeeded(); @@ -179,6 +180,14 @@ void StoredSettings::loadSwatchColours() colours [2 + i].toString()))); } +void StoredSettings::saveSwatchColours() +{ + PropertiesFile& props = getGlobalProperties(); + + for (int i = 0; i < swatchColours.size(); ++i) + props.setValue ("swatchColour" + String (i), swatchColours.getReference(i).toString()); +} + int StoredSettings::ColourSelectorWithSwatches::getNumSwatches() const { return getAppSettings().swatchColours.size(); diff --git a/extras/Introjucer/Source/Utility/jucer_StoredSettings.h b/extras/Introjucer/Source/Utility/jucer_StoredSettings.h index a7d54e5879..83fbc0ca87 100644 --- a/extras/Introjucer/Source/Utility/jucer_StoredSettings.h +++ b/extras/Introjucer/Source/Utility/jucer_StoredSettings.h @@ -71,6 +71,7 @@ private: void updateGlobalProps(); void loadSwatchColours(); + void saveSwatchColours(); JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (StoredSettings) };