Commit 49e35a91 authored by Benoît Minisini's avatar Benoît Minisini
Browse files

FileView: Fix automatic extension behaviour.

[GB.FORM]
* BUG: FileView: Fix automatic extension behaviour.
parent 61ff5b90
Pipeline #301926168 passed with stage
in 21 minutes and 49 seconds
......@@ -450,7 +450,7 @@ Public Sub SetPath(sPath As String)
txtFile.Text = File.Name(sPath)
Endif
CheckAutomaticExtension
CheckAutomaticExtension(True)
Endif
......@@ -579,7 +579,7 @@ Public Function GetFilter() As String[]
End
Private Sub CheckAutomaticExtension()
Private Sub CheckAutomaticExtension(Optional bGetCurrentFilter As Boolean)
Dim aFilter As String[]
Dim sFilter As String
......@@ -596,6 +596,7 @@ Private Sub CheckAutomaticExtension()
If InStr(sFilter, "*") Then Return
sFile = txtFile.Text
If bGetCurrentFilter Then $sLastExt = sFilter
If $sLastExt And If sFile Ends $sLastExt Then sFile = Left(sFile, -Len($sLastExt))
txtFile.Text = sFile & sFilter
$sLastExt = sFilter
......@@ -1732,7 +1733,7 @@ Private Sub AutoExt_Write(Value As Boolean)
If $bAutoExt = Value Then Return
$bAutoExt = Value
CheckAutomaticExtension
CheckAutomaticExtension(True)
End
......@@ -1768,3 +1769,9 @@ Private Sub IsCompressedFile(sFile As String, Optional bCustom As Boolean) As Bo
Endif
End
Public Sub txtFile_LostFocus()
CheckAutomaticExtension(True)
End
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment