Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 12 additions & 15 deletions src/NewTools-FileBrowser/StFileSystemPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand Down
Loading