You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Show scene when showing built-in script file
(cherry picked from commit 512e260af4)
This commit is contained in:
@@ -1173,8 +1173,12 @@ void ScriptEditor::_menu_option(int p_option) {
|
|||||||
} break;
|
} break;
|
||||||
case SHOW_IN_FILE_SYSTEM: {
|
case SHOW_IN_FILE_SYSTEM: {
|
||||||
const RES script = current->get_edited_resource();
|
const RES script = current->get_edited_resource();
|
||||||
const String path = script->get_path();
|
String path = script->get_path();
|
||||||
if (!path.empty()) {
|
if (!path.empty()) {
|
||||||
|
if (path.find("::") != -1) { // Built-in.
|
||||||
|
path = path.get_slice("::", 0); // Show the scene instead.
|
||||||
|
}
|
||||||
|
|
||||||
FileSystemDock *file_system_dock = EditorNode::get_singleton()->get_filesystem_dock();
|
FileSystemDock *file_system_dock = EditorNode::get_singleton()->get_filesystem_dock();
|
||||||
file_system_dock->navigate_to_path(path);
|
file_system_dock->navigate_to_path(path);
|
||||||
// Ensure that the FileSystem dock is visible.
|
// Ensure that the FileSystem dock is visible.
|
||||||
|
|||||||
Reference in New Issue
Block a user