From a2661adba81dd5714f52eb4f652cfcfe643631a2 Mon Sep 17 00:00:00 2001 From: stmSi Date: Sun, 25 Dec 2022 19:37:32 +0630 Subject: [PATCH] Suggest Filename in Remote Tree File Dialog --- editor/script_editor_debugger.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index 3e4657a60..aae8bc10d 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -2296,6 +2296,10 @@ void ScriptEditorDebugger::_item_menu_id_pressed(int p_option) { file_dialog->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper()); } + TreeItem *ti = inspect_scene_tree->get_selected(); + String filename = ti->get_text(0) + "." + extensions.front()->get().to_lower(); + + file_dialog->set_current_path(filename); file_dialog->popup_centered_ratio(); } break; case ITEM_MENU_COPY_NODE_PATH: {