From 7c42918f700f7d83f85f11b379c09c82d0472c29 Mon Sep 17 00:00:00 2001 From: AlexisCnockaert Date: Fri, 12 Sep 2025 14:12:16 +0200 Subject: [PATCH] Fix potential freezing browser Due to the possible complexity of subdirectories when opening the ```File Browser```, now it dont expand the tree when its opened --- .../StFileSystemPresenter.class.st | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/NewTools-FileBrowser/StFileSystemPresenter.class.st b/src/NewTools-FileBrowser/StFileSystemPresenter.class.st index 132a7b9ad..2d1ff13d0 100644 --- a/src/NewTools-FileBrowser/StFileSystemPresenter.class.st +++ b/src/NewTools-FileBrowser/StFileSystemPresenter.class.st @@ -100,25 +100,22 @@ StFileSystemPresenter >> bookmarksTreeTable [ ] { #category : 'initialization' } -StFileSystemPresenter >> connectPresenters [ +StFileSystemPresenter >> connectPresenters [ "Here we check that the window is displayed. If it's not, that means this is a first opening so it should preserve the path selected by the user (through openOnLastDirectory preference, or defaultRoot: message send) and not to transmit the directory selection" super connectPresenters. - - treeNavigationSystem - transmitDo: [ : selection | - (self isDisplayed and: [ selection isNotNil ]) - ifTrue: [ self updateWidgetWithFileReference: selection fileReference ] ]. - - bookmarksTreeTable whenSelectionChangedDo: [ :selection | - selection selectedItem ifNotNil: [ :selectedItem | - selectedItem isComposite ifFalse: [ - self fileNavigationSystem openFolder: selectedItem location ] ] ]. - - self whenDisplayDo: [ - self centered. - treeNavigationSystem expandPath: fileNavigationSystem currentDirectory ]. + + treeNavigationSystem transmitDo: [ :selection | + (self isDisplayed and: [ selection isNotNil ]) ifTrue: [ + self updateWidgetWithFileReference: selection fileReference ] ]. + + bookmarksTreeTable whenSelectionChangedDo: [ :selection | + selection selectedItem ifNotNil: [ :selectedItem | + selectedItem isComposite ifFalse: [ + self fileNavigationSystem openFolder: selectedItem location ] ] ]. + + self whenDisplayDo: [ self centered ] ] { #category : 'layout' }