Browse Source

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

tags/2021-05-28
ed 6 years ago
parent
commit
fb5d55f052
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      modules/juce_gui_basics/filebrowser/juce_FilenameComponent.cpp

+ 4
- 2
modules/juce_gui_basics/filebrowser/juce_FilenameComponent.cpp 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()


Loading…
Cancel
Save