Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf683b6b

Browse files
File Icon Type setting reflects immediately#1765 (#1773)
* File Icon Type setting reflects immediately#1765---------Co-authored-by: Tom Ludwig <tommludwig@icloud.com>
1 parent0f9924e commitf683b6b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎CodeEdit/Features/NavigatorArea/ProjectNavigator/OutlineView/ProjectNavigatorViewController.swift‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ final class ProjectNavigatorViewController: NSViewController {
2828

2929
varworkspace:WorkspaceDocument?
3030

31-
variconColor:SettingsData.FileIconStyle=.color
31+
variconColor:SettingsData.FileIconStyle=.color{
32+
willSet{
33+
if newValue!= iconColor{
34+
outlineView.reloadData()
35+
}
36+
}
37+
}
3238

3339
varfileExtensionsVisibility:SettingsData.FileExtensionsVisibility=.showAll
3440
varshownFileExtensions:SettingsData.FileExtensions=.default
@@ -275,9 +281,7 @@ extension ProjectNavigatorViewController: NSOutlineViewDelegate {
275281
}
276282

277283
func outlineViewSelectionDidChange(_ notification:Notification){
278-
guardlet outlineView= notification.objectas?NSOutlineViewelse{
279-
return
280-
}
284+
guardlet outlineView= notification.objectas?NSOutlineViewelse{return}
281285

282286
letselectedIndex= outlineView.selectedRow
283287

@@ -298,13 +302,9 @@ extension ProjectNavigatorViewController: NSOutlineViewDelegate {
298302
guard
299303
let id= workspace?.editorManager.activeEditor.selectedTab?.file.id,
300304
let item= workspace?.workspaceFileManager?.getFile(id, createIfNotFound:true)
301-
else{
302-
return
303-
}
305+
else{return}
304306
/// update outline selection only if the parent of selected item match with expanded item
305-
guard item.parent=== notification.userInfo?["NSObject"]as?CEWorkspaceFileelse{
306-
return
307-
}
307+
guard item.parent=== notification.userInfo?["NSObject"]as?CEWorkspaceFileelse{return}
308308
/// select active file under collapsed folder only if its parent is expanding
309309
if outlineView.isItemExpanded(item.parent){
310310
updateSelection(itemID: item.id)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp