You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Added "Show In FileSystem" right-click option to Scene hierarchy nodes.
-Implemented shared function for focusing FileSystem tab and highlighting the node path. -Created right-click option that shows up in the Scene-Hierarchy on Nodes that have a file-system source path. -Created custom icon for this right-click option -Implemented the shared function and icon for other places that already had this features (Open Node tab, Inspector Resource) Co-authored-by: MewPurPur <mew.pur.pur@gmail.com>
This commit is contained in:
@@ -756,6 +756,14 @@ void FileSystemDock::_navigate_to_path(const String &p_path, bool p_select_in_fa
|
||||
void FileSystemDock::navigate_to_path(const String &p_path) {
|
||||
file_list_search_box->clear();
|
||||
_navigate_to_path(p_path);
|
||||
|
||||
// Ensure that the FileSystem dock is visible.
|
||||
if (get_window() == get_tree()->get_root()) {
|
||||
TabContainer *tab_container = (TabContainer *)get_parent_control();
|
||||
tab_container->set_current_tab(tab_container->get_tab_idx_from_control((Control *)this));
|
||||
} else {
|
||||
get_window()->grab_focus();
|
||||
}
|
||||
}
|
||||
|
||||
void FileSystemDock::_file_list_thumbnail_done(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, const Variant &p_udata) {
|
||||
|
||||
Reference in New Issue
Block a user