From b3d35345e942491b0ccdcfa73b894d9383496bf6 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 13 Mar 2018 12:47:10 +0000 Subject: [PATCH] Projucer: Ensure that FilePathPropertyComponent text colour is updated when entering a path --- .../PropertyComponents/jucer_FilePathPropertyComponent.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/extras/Projucer/Source/Utility/UI/PropertyComponents/jucer_FilePathPropertyComponent.h b/extras/Projucer/Source/Utility/UI/PropertyComponents/jucer_FilePathPropertyComponent.h index bcf5a35580..5749986421 100644 --- a/extras/Projucer/Source/Utility/UI/PropertyComponents/jucer_FilePathPropertyComponent.h +++ b/extras/Projucer/Source/Utility/UI/PropertyComponents/jucer_FilePathPropertyComponent.h @@ -66,8 +66,9 @@ private: { addAndMakeVisible (textbox); textbox.getTextValue().referTo (value); - textbox.onReturnKey = [this] { updateEditorColour (textbox); }; - textbox.onFocusLost = [this] { updateEditorColour (textbox); }; + textbox.onReturnKey = [this] { updateEditorColour (textbox); }; + textbox.onFocusLost = [this] { updateEditorColour (textbox); }; + textbox.onTextChange = [this] { updateEditorColour (textbox); }; addAndMakeVisible (button); button.onClick = [this] { browse(); }; @@ -163,10 +164,10 @@ private: if (pathToCheck.contains ("${user.home}")) pathToCheck = pathToCheck.replace ("${user.home}", File::getSpecialLocation (File::userHomeDirectory).getFullPathName()); - #if JUCE_WINDOWS + #if JUCE_WINDOWS if (pathToCheck.startsWith ("~")) pathToCheck = pathToCheck.replace ("~", File::getSpecialLocation (File::userHomeDirectory).getFullPathName()); - #endif + #endif const auto currentFile = root.getChildFile (pathToCheck);