1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-31 03:00:05 +00:00

Fixed bug in project path settings where global values were erroneously set to project-specific values.

This commit is contained in:
Timur Doumler 2015-08-13 20:42:40 +01:00
parent aefd5d3725
commit a362dbe6aa

View file

@ -51,10 +51,13 @@ try : TextPropertyComponent (propertyName, 1024, false),
pathValue (value),
pathValueSource (dynamic_cast<DependencyPathValueSource&> (pathValue.getValueSource()))
{
bool initialValueIsEmpty = value.toString().isEmpty();
bool initialValueIsEmpty = ! pathValueSource.isUsingProjectSettings();
getValue().referTo (pathValue);
// the following step is necessary because the above referTo() has internally called setValue(),
// which has set the project value to whatever is displayed in the label (this may be the
// global/fallback value). In this case we have to reset the project value to blank:
if (initialValueIsEmpty)
getValue().setValue (String::empty);