1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: Check the global path setting state when creating the ModulesFolderPathBox in the new project template component

This commit is contained in:
ed 2019-11-19 16:04:49 +00:00
parent 3d5c6b8a03
commit 2b0f75070c

View file

@ -54,9 +54,7 @@ public:
addAndMakeVisible (modulesLabel);
modulesLabel.attachToComponent (&currentPathBox, true);
addAndMakeVisible (useGlobalPathsToggle);
useGlobalPathsToggle.setToggleState (true, sendNotification);
useGlobalPathsToggle.onClick = [this]
auto updateEnablement = [this]
{
isUsingGlobalPaths = useGlobalPathsToggle.getToggleState();
@ -64,6 +62,12 @@ public:
openFolderButton.setEnabled (! isUsingGlobalPaths);
modulesLabel.setEnabled (! isUsingGlobalPaths);
};
addAndMakeVisible (useGlobalPathsToggle);
useGlobalPathsToggle.setToggleState (true, sendNotification);
useGlobalPathsToggle.onClick = [updateEnablement] { updateEnablement(); };
updateEnablement();
}
void resized() override