Skip to content

Commit 1238694

Browse files
committed
Filename input field isn't cleared while switching folders in file selection mode
1 parent 980307c commit 1238694

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Plugins/SimpleFileBrowser/Scripts/FileBrowser.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2187,7 +2187,11 @@ private void UpdateFilenameInputFieldWithSelection()
21872187
filenameInputField.interactable = selectedFileEntries.Count <= 1;
21882188

21892189
if( filenameContributingFileCount == 0 )
2190-
filenameInputField.text = string.Empty;
2190+
{
2191+
// If multiple files were previously selected, clear the input field. If a single file was selected, preserve the filename
2192+
if( filenameInputField.text.StartsWith( "\"" ) )
2193+
filenameInputField.text = string.Empty;
2194+
}
21912195
else
21922196
{
21932197
if( filenameContributingFileCount > 1 )

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.yasirkula.simplefilebrowser",
33
"displayName": "Simple File Browser",
4-
"version": "1.4.6",
4+
"version": "1.4.7",
55
"documentationUrl": "https://github.com/yasirkula/UnitySimpleFileBrowser",
66
"changelogUrl": "https://github.com/yasirkula/UnitySimpleFileBrowser/releases",
77
"licensesUrl": "https://github.com/yasirkula/UnitySimpleFileBrowser/blob/master/LICENSE.txt",

0 commit comments

Comments
 (0)