From f796596378a23ee0a76ee28ea4293500e4169026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Thu, 6 Jul 2023 21:02:17 +0200 Subject: [PATCH] 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). --- app/src/gambas3/.src/Project/CProjectTree.class | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/gambas3/.src/Project/CProjectTree.class b/app/src/gambas3/.src/Project/CProjectTree.class index 461e406cf..810c23243 100644 --- a/app/src/gambas3/.src/Project/CProjectTree.class +++ b/app/src/gambas3/.src/Project/CProjectTree.class @@ -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