summaryrefslogtreecommitdiff
path: root/editor/filesystem_dock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/filesystem_dock.cpp')
-rw-r--r--editor/filesystem_dock.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 218ccd4b30..b5f77d1d33 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -1065,6 +1065,11 @@ void FileSystemDock::_folder_option(int p_option) {
child = child->get_next();
}
break;
+ case FOLDER_SHOW_IN_EXPLORER:
+ String path = item->get_metadata(tree->get_selected_column());
+ String dir = GlobalConfig::get_singleton()->globalize_path(path);
+ OS::get_singleton()->shell_open(String("file://") + dir);
+ return;
}
}
@@ -1103,6 +1108,9 @@ void FileSystemDock::_dir_rmb_pressed(const Vector2 &p_pos) {
folder_options->add_item(TTR("Expand all"), FOLDER_EXPAND_ALL);
folder_options->add_item(TTR("Collapse all"), FOLDER_COLLAPSE_ALL);
+ folder_options->add_separator();
+ folder_options->add_item(TTR("Show In File Manager"), FOLDER_SHOW_IN_EXPLORER);
+
folder_options->set_position(tree->get_global_position() + p_pos);
folder_options->popup();
}