Don't trash the current selection when filling the project tree while expanding a parent directory (continue).

[DEVELOPMENT ENVIRONMENT]
* BUG: Don't trash the current selection when filling the project tree while expanding a parent directory (continue).
This commit is contained in:
Benoît Minisini 2023-07-06 21:02:17 +02:00
parent 550a5e7cdc
commit f796596378

View file

@ -327,6 +327,7 @@ Private Procedure AddDir(Optional sDir As String)
Dim aDir As New String[]
Dim sFile As String
Dim aFile As New String[]
Dim aSelection As String[]
If sDir Then
aDir.Add(sDir)
@ -335,7 +336,7 @@ Private Procedure AddDir(Optional sDir As String)
If $sDir <> $sSourceDir Then aDir.Add($sSourceDir)
Endif
$hTree._SaveSelection()
aSelection = $hTree.Selection
$hTree._Begin()
Repeat
@ -374,7 +375,7 @@ Private Procedure AddDir(Optional sDir As String)
Until aDir.Count = 0
$hTree._End()
$hTree._RestoreSelection()
$hTree.Selection = aSelection
End