From 90891f2cd615a8bd758f62deb415d1780915def0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sat, 31 May 2014 20:16:40 +0000 Subject: [PATCH] [GB.FORM] * BUG: Update directory cache just before locking it, so that its contents is valid during the lock. * NEW: FileChooser: Uncompressing a file automatically selects the uncompressed directory if appropriate. git-svn-id: svn://localhost/gambas/trunk@6297 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- comp/src/gb.form/.src/File/Chooser/FDirChooser.class | 5 ++++- comp/src/gb.form/.src/File/DirCache.class | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/comp/src/gb.form/.src/File/Chooser/FDirChooser.class b/comp/src/gb.form/.src/File/Chooser/FDirChooser.class index 1805fdf9a..62831444b 100644 --- a/comp/src/gb.form/.src/File/Chooser/FDirChooser.class +++ b/comp/src/gb.form/.src/File/Chooser/FDirChooser.class @@ -1219,7 +1219,10 @@ Public Sub mnuUncompress_Click() Reload hTreeView = dvwChoose.Proxy - If sShow Then Try hTreeView[fvwChoose.Dir &/ sShow].EnsureVisible + If sShow Then + Try hTreeView[fvwChoose.Dir &/ sShow].EnsureVisible + Try hTreeView[fvwChoose.Dir &/ sShow].Selected = True + Endif Return diff --git a/comp/src/gb.form/.src/File/DirCache.class b/comp/src/gb.form/.src/File/DirCache.class index f33531fee..6d6b522da 100644 --- a/comp/src/gb.form/.src/File/DirCache.class +++ b/comp/src/gb.form/.src/File/DirCache.class @@ -15,6 +15,8 @@ Static Public Sub _get(sDir As String) As DirCache Dim hCache As DirCache + If Right(sDir) <> "/" Then sDir &= "/" + hCache = $cCache[sDir] If Not hCache Then hCache = New DirCache(sDir) @@ -121,6 +123,7 @@ End Public Sub Lock() + If $iLock = 0 Then CheckValid Inc $iLock End