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

Fixed the behaviour of FilenameComponent::getLocationToBrowse() when a default file has been set

This commit is contained in:
ed 2019-04-29 10:18:18 +01:00
parent 17be524798
commit fb5d55f052

View file

@ -107,8 +107,10 @@ void FilenameComponent::setDefaultBrowseTarget (const File& newDefaultDirectory)
File FilenameComponent::getLocationToBrowse()
{
return getCurrentFile() == File() ? defaultBrowseFile
: getCurrentFile();
if (lastFilename.isEmpty() && defaultBrowseFile != File())
return defaultBrowseFile;
return getCurrentFile();
}
void FilenameComponent::showChooser()