@@ -136,9 +136,9 @@ public: | |||||
//============================================================================== | //============================================================================== | ||||
void initialiseDependencyPathValues() override | void initialiseDependencyPathValues() override | ||||
{ | { | ||||
vst3PathValueWrapper.init (settings, Ids::vst3Path, TargetOS::windows); | |||||
aaxPathValueWrapper .init (settings, Ids::aaxPath, TargetOS::windows); | |||||
rtasPathValueWrapper.init (settings, Ids::rtasPath, TargetOS::windows); | |||||
vst3PathValueWrapper.init ({ settings, Ids::vst3Folder, nullptr }, getAppSettings().getStoredPath (Ids::vst3Path, TargetOS::windows), TargetOS::windows); | |||||
aaxPathValueWrapper .init ({ settings, Ids::aaxFolder, nullptr }, getAppSettings().getStoredPath (Ids::aaxPath, TargetOS::windows), TargetOS::windows); | |||||
rtasPathValueWrapper.init ({ settings, Ids::rtasFolder, nullptr }, getAppSettings().getStoredPath (Ids::rtasPath, TargetOS::windows), TargetOS::windows); | |||||
} | } | ||||
//============================================================================== | //============================================================================== | ||||
@@ -445,9 +445,9 @@ public: | |||||
//============================================================================== | //============================================================================== | ||||
void initialiseDependencyPathValues() override | void initialiseDependencyPathValues() override | ||||
{ | { | ||||
vst3PathValueWrapper.init (settings, Ids::vst3Path, TargetOS::osx); | |||||
aaxPathValueWrapper .init (settings, Ids::aaxPath, TargetOS::osx); | |||||
rtasPathValueWrapper.init (settings, Ids::rtasPath, TargetOS::osx); | |||||
vst3PathValueWrapper.init ({ settings, Ids::vst3Folder, nullptr }, getAppSettings().getStoredPath (Ids::vst3Path, TargetOS::osx), TargetOS::osx); | |||||
aaxPathValueWrapper .init ({ settings, Ids::aaxFolder, nullptr }, getAppSettings().getStoredPath (Ids::aaxPath, TargetOS::osx), TargetOS::osx); | |||||
rtasPathValueWrapper.init ({ settings, Ids::rtasFolder, nullptr }, getAppSettings().getStoredPath (Ids::rtasPath, TargetOS::osx), TargetOS::osx); | |||||
} | } | ||||
protected: | protected: | ||||
@@ -374,26 +374,26 @@ protected: | |||||
// Used for the VST3, RTAS and AAX project-specific path options. | // Used for the VST3, RTAS and AAX project-specific path options. | ||||
struct ValueWithDefaultWrapper : public Value::Listener | struct ValueWithDefaultWrapper : public Value::Listener | ||||
{ | { | ||||
void init (ValueTree tree, const Identifier& identifierToUse, TargetOS::OS targetOS) | |||||
void init (const ValueWithDefault& vwd, ValueWithDefault global, TargetOS::OS targetOS) | |||||
{ | { | ||||
identifier = identifierToUse; | |||||
wrappedValue = vwd; | |||||
globalValue = global.getPropertyAsValue(); | |||||
globalIdentifier = global.getPropertyID(); | |||||
os = targetOS; | os = targetOS; | ||||
globalValue = getAppSettings().getStoredPath (identifier, os).getPropertyAsValue(); | |||||
globalValue.addListener (this); | globalValue.addListener (this); | ||||
wrappedValue.referTo (tree, identifier, nullptr, getAppSettings().getStoredPath (identifier, os).get()); | |||||
valueChanged (globalValue); | |||||
} | } | ||||
void valueChanged (Value&) override | void valueChanged (Value&) override | ||||
{ | { | ||||
wrappedValue.setDefault (getAppSettings().getStoredPath (identifier, os).get()); | |||||
wrappedValue.setDefault (getAppSettings().getStoredPath (globalIdentifier, os).get()); | |||||
} | } | ||||
ValueWithDefault wrappedValue; | ValueWithDefault wrappedValue; | ||||
Value globalValue; | Value globalValue; | ||||
Identifier identifier; | |||||
Identifier globalIdentifier; | |||||
TargetOS::OS os; | TargetOS::OS os; | ||||
}; | }; | ||||