mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-17 00:44:19 +00:00
Added a flag to FileBrowserComponent to allow it to keep the current name when the folder changes, and used this flag in the introjucer's new project wizard.
This commit is contained in:
parent
cd056a89cc
commit
d3f76766db
3 changed files with 34 additions and 16 deletions
6
modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp
Normal file → Executable file
6
modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp
Normal file → Executable file
|
|
@ -387,7 +387,7 @@ void FileBrowserComponent::fileDoubleClicked (const File& f)
|
|||
{
|
||||
setRoot (f);
|
||||
|
||||
if ((flags & canSelectDirectories) != 0)
|
||||
if ((flags & canSelectDirectories) != 0 && (flags & doNotClearFileNameOnRootChange) == 0)
|
||||
filenameBox.setText (String::empty);
|
||||
}
|
||||
else
|
||||
|
|
@ -432,7 +432,9 @@ void FileBrowserComponent::textEditorReturnKeyPressed (TextEditor&)
|
|||
{
|
||||
setRoot (f);
|
||||
chosenFiles.clear();
|
||||
filenameBox.setText (String::empty);
|
||||
|
||||
if ((flags & doNotClearFileNameOnRootChange) == 0)
|
||||
filenameBox.setText (String());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue