diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-07 20:30:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-07 20:30:05 +0100 |
commit | aaa5ca7be28d3b4e34a6ff6a870e024fd6571ef1 (patch) | |
tree | c7af18a8c7fdb9f873264f7328423492f1b32954 /editor | |
parent | 56d8a2295de01eafb831112cac9710323f27fac2 (diff) | |
parent | a1ab8f889032fbf779b5bd5a08e6bae9e15aafce (diff) |
Merge pull request #34893 from volzhs/show-main-scene-in-split
Show selected main scene in FileSystem split view
Diffstat (limited to 'editor')
-rw-r--r-- | editor/filesystem_dock.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 1fecdfe555..6b68d3f149 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -90,6 +90,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory // Create all items for the files in the subdirectory. if (display_mode == DISPLAY_MODE_TREE_ONLY) { + String main_scene = ProjectSettings::get_singleton()->get("application/run/main_scene"); for (int i = 0; i < p_dir->get_file_count(); i++) { String file_type = p_dir->get_file_type(i); @@ -119,7 +120,6 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory file_item->select(0); file_item->set_as_cursor(0); } - String main_scene = ProjectSettings::get_singleton()->get("application/run/main_scene"); if (main_scene == file_metadata) { file_item->set_custom_color(0, get_color("accent_color", "Editor")); } @@ -750,6 +750,7 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) { } // Fills the ItemList control node from the FileInfos. + String main_scene = ProjectSettings::get_singleton()->get("application/run/main_scene"); String oi = "Object"; for (List<FileInfo>::Element *E = filelist.front(); E; E = E->next()) { FileInfo *finfo = &(E->get()); @@ -786,6 +787,10 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) { files->set_item_metadata(item_index, fpath); } + if (fpath == main_scene) { + files->set_item_custom_fg_color(item_index, get_color("accent_color", "Editor")); + } + // Generate the preview. if (!finfo->import_broken) { Array udata; |