@@ -28,7 +28,13 @@ final class ProjectNavigatorViewController: NSViewController {
28
28
29
29
var workspace : WorkspaceDocument ?
30
30
31
- var iconColor : SettingsData . FileIconStyle = . color
31
+ var iconColor : SettingsData . FileIconStyle = . color {
32
+ willSet {
33
+ if newValue != iconColor {
34
+ outlineView. reloadData ( )
35
+ }
36
+ }
37
+ }
32
38
33
39
var fileExtensionsVisibility : SettingsData . FileExtensionsVisibility = . showAll
34
40
var shownFileExtensions : SettingsData . FileExtensions = . default
@@ -275,9 +281,7 @@ extension ProjectNavigatorViewController: NSOutlineViewDelegate {
275
281
}
276
282
277
283
func outlineViewSelectionDidChange( _ notification: Notification ) {
278
- guard let outlineView = notification. object as? NSOutlineView else {
279
- return
280
- }
284
+ guard let outlineView = notification. object as? NSOutlineView else { return }
281
285
282
286
let selectedIndex = outlineView. selectedRow
283
287
@@ -298,13 +302,9 @@ extension ProjectNavigatorViewController: NSOutlineViewDelegate {
298
302
guard
299
303
let id = workspace? . editorManager. activeEditor. selectedTab? . file. id,
300
304
let item = workspace? . workspaceFileManager? . getFile ( id, createIfNotFound: true )
301
- else {
302
- return
303
- }
305
+ else { return }
304
306
/// update outline selection only if the parent of selected item match with expanded item
305
- guard item. parent === notification. userInfo ? [ " NSObject " ] as? CEWorkspaceFile else {
306
- return
307
- }
307
+ guard item. parent === notification. userInfo ? [ " NSObject " ] as? CEWorkspaceFile else { return }
308
308
/// select active file under collapsed folder only if its parent is expanding
309
309
if outlineView. isItemExpanded ( item. parent) {
310
310
updateSelection ( itemID: item. id)
0 commit comments